I would like to use view parameters to get bookmarkable URLs with JSF 2, but I use JSPs and all the help and examples I can find, uses facelets. Here is want I have done so far:
search.jsp (calling page):
<t:commandLink action="...">
<f:param name="param1" value="foo"/>
<h:outputText value="..."/>
</t:commandLink>
faces-config.xml:
<navigation-rule>
<navigation-case>
<from-outcome>go_edit</from-outcome>
<to-view-id>/views/edit.jsp</to-view-id>
<redirect>
<view-param>
<name>param1</name>
<value>#{edit.param1}</value>
</view-param>
</redirect>
</navigation-case>
</navigation-rule>
Edit.java (edit page backing bean):
public class Edit extends ... {
private String param1;
public String getParam1(){
return param1;
}
public void setParam1(String param1){
this.param1 = param1;
}
...
}
I think the problem is, that I didn't add the view params to the edit page (e.g. edit.jsp). I only found facelet examples, which look like this:
<f:metadata>
<f:viewParam name="id" value="#{bean.id}" />
</f:metadata>
My question is, can I use JSP view params? Can someone provide or point me to an complete example? Especially the part with the target page (e.g. edit.jsp).