Reply To: Need help with Navigation

Splash Forums PrettyFaces Users Need help with Navigation Reply To: Need help with Navigation

#26548

You should not use a commandButton just for navigation. You should use h:link instead. The creates a standard HTML link which works much better for navigation.

Change your configuration to this:

<url-mapping id="viewCategory">
  <pattern value="/#{ category : category.categoryName }"/>
  <view-id value="/faces/somethingList.xhtml"/>
</url-mapping>

And use a standard h:link like this:

<h:link outcome="/faces/somethingList.xhtml">
  <f:param name="category" value="#{category.categoryName}"/>
  Click
</h:link>