I have a page: http://mypage.com/items.jsf.
This page takes the following for granted:
- ID is set by GET or ID is set by POST.
Now, I can manually call items.jsf?ID=10
But what I really want to do is have a Button which calls a function that returns the navigation URL.
public String test()
{
return "10";
}
Now having the following code in the JSF file.
<h:form>
<h:commandButton action="#{itemsBean.test}" value="Redirect me" />
</h:form>
What I want to happen is that when I press "Redirect me", I want a Navigation-Rule to know that I want to go to: items.jsf?ID=10
Is this possible? It feels like it's a trivial problem really.