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.
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.
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.
Sometimes the only way things ever got fixed is because people became uncomfortable.
You get good luck from rubbing the belly of a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss