On 11/30/05, Julián García <[EMAIL PROTECTED]> wrote:
You'd end up with request attributes cleared on the second request, but session attributes would still be there.
Configuration is the easy part ... just include a section like this in a faces-config.xml file:
<application>
<navigation-handler>
org.apache.shale.dialog.faces.DialogNavigationHandler
</navigation-handler>
</application>
The fully qualified class name above is Shale's custom dialog handler implementation, used to manage navigation within a dialog ... you might want to take a look at that, although the only method you actually need to implement is:
public void handleNavigation(FacesContext context,
String fromAction, String outcome);
You should also note how the constructor of this class is set up, which allows you to delegate some navigation decisions to the standard handler.
Nightly builds of Shale (including source, and including this class, which is in the "core-library" subdirectory) are available at:
http://cvs.apache.org/builds/struts/nightly/struts-shale/
Craig
>
> If you want to control what URL is *shown* in the browser, then only
> *redirect* commands will do that. Navigation rules can specify redirect
> should be used instead of forward, but that *does* have performance
> problems, and other limitations. I suggest carefully investigating the
> implications of using redirects before doing this.
As far as I understand, using this will clean my context, and this is
not a feasible alternative for me since I masively use saveStates....Am
I wrong.
You'd end up with request attributes cleared on the second request, but session attributes would still be there.
>
> If you just want to do some kind of security based on the URL forwarded
> to, then I would suggest investigating writing a custom NavigationHandler.
This sounds like a feasible approach. Any reference to particular custom
implementations of this class? How do I configure a custom
NavigationHandler in faces.
Configuration is the easy part ... just include a section like this in a faces-config.xml file:
<application>
<navigation-handler>
org.apache.shale.dialog.faces.DialogNavigationHandler
</navigation-handler>
</application>
The fully qualified class name above is Shale's custom dialog handler implementation, used to manage navigation within a dialog ... you might want to take a look at that, although the only method you actually need to implement is:
public void handleNavigation(FacesContext context,
String fromAction, String outcome);
You should also note how the constructor of this class is set up, which allows you to delegate some navigation decisions to the standard handler.
Nightly builds of Shale (including source, and including this class, which is in the "core-library" subdirectory) are available at:
http://cvs.apache.org/builds/struts/nightly/struts-shale/
Craig

