deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "l.penet@senat.fr" <l.pe...@senat.fr>
Subject Re: Question on JSF Module, NavigationParameterContext and ViewNavigationHandler
Date Tue, 21 Apr 2015 07:49:45 GMT
On 20/04/2015 19:16, Gerhard Petracek wrote:
> hi ludovic,
>
> ViewParameterMode#INCLUDE just adds "includeViewParams=true" to the outcome.
> it is needed in your case, because you configured NavigationMode.REDIRECT.
> (-> the behavior is the same as with std. jsf - you just provide the
> information in a type-safe way instead of using strings.
> the jsf implementation you are using will see the same in both cases,
> because deltaspike just transforms your config to a std. navigation string
> and forwards that string to the wrapped-/default-implementation).
I understand that and it is a clear progress from "raw" NavigationHandler.

However, one can also easily use :

         ConfigurableNavigationHandler configurableNavigationHandler = 
(ConfigurableNavigationHandler) 
FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
configurableNavigationHandler.performNavigation("/my_page?faces-redirect=true&actid=whatever");

and add pass params only to the view we are navigating to. I do not 
"semantically" want to add parameters to the current view.

There are of course tons of other way to perform a redirect, like

FacesContext.getCurrentInstance().getExternalContext().redirect("/my_page.xhtml?actid=<whatever>");



I would like to keep the benefits of Type-save View-Configs while 
passing parameters as easily as with the ConfigurableNavigationHandler.

Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|


Mime
View raw message