Reply To: Redirect to same page with changed viewParam

Splash Forums Rewrite Users Redirect to same page with changed viewParam Reply To: Redirect to same page with changed viewParam

#26658

fkoentopp
Participant

Hi,

thanks for the answer. Actually in step 2, I am clearing the bean property:

@Named
@ViewScoped
public class Bean {
    public void applyObservationDateActive() throws IOException {
        if (this.observationDateActive) {
            this.setObservationDate(DateTime.now());
        } else {
            this.setObservationDate(null);
        }

        final FacesContext context = FacesContext.getCurrentInstance();
        final NavigationHandler navigationHandler = context.getApplication().getNavigationHandler();
        navigationHandler.handleNavigation(context, null, "refresh");
    }
}

And in step 3 which is then triggered in navigationHandler.handleNavigation(context, null, "refresh") the Rewrite method RewriteViewHandler#getActionURL(...) is called, yes.