Reply To: Retaing View Parameters with Rewrite

Splash Forums Rewrite Users Retaing View Parameters with Rewrite Reply To: Retaing View Parameters with Rewrite

#25783

This looks really complicated. If I understand your code correctly, you are basically doing a postback which will set the id in the target bean, invoke an action method which redirects the user to the details view using the ID previously written to the bean.

Why don’t you use h:link instead? This way you will get a plain HTML link and don’t have to do a postback to the server at all:

<h:link outcome="View_Article">
  <h:outputText value="View Details"/>
  <f:param name="id" value="#{item.ArticleId}" />
</h:link>

Much cleaner. 🙂