aspose file tools*
The moose likes JSF and the fly likes Navigation rule not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Navigation rule not working" Watch "Navigation rule not working" New topic
Author

Navigation rule not working

Scott Stephens
Greenhorn

Joined: Jun 25, 2011
Posts: 23

I have a string literal "LOGOUT" as action that should trigger a navigation rule:


Here the faces-config.xml


the first rule for navigation to the right page following login works good. My logout <t:commandNavigation ´... action="LOGOUT"> however doesnt. The browser URL shows only http://localhost:8080/Perso/index.xhtml#
What is wrong? Maybe someone has an idea.
Scott Stephens
Greenhorn

Joined: Jun 25, 2011
Posts: 23

I wrapped the navigation panel with a <h:form> tag . Now it works. Apparently, a POST OR GET REQUEST is necessary to send the string literal to the web server. I assume this is taken care of by the <h:form> tag.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16012
    
  19

You are correct. JSF operates primarily via a series of postback operations done via HTTP POST. For HTTP POST, a form must exist, and to get the extra indicators that help JSF process propertly, it should be a JSF "h:form" or equivalent and not a bare HTML FORM tag with ACTION=POST on it.

This is true even for "hyperlink" tags such as h:commandLink and for menu tags, since, unlike bare HTML A HREF= tags, they will go through the JSF postback engine.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Navigation rule not working