I am using JSF 2.0 and I have a navigation problem after commandLink and commandButton. I am using the following code:
<h:commandLink action="login?faces-redirect=true"
value="#{showElementBean.showElement()}"> Login </h:commandLink>
<h:commandButton action="login?faces-redirect=true" value="Move to login.xhtml" />
These tags are inside the form, login is just an example. The result of clicking on the rendered controls is always a POST with an update of the current page. What am I wrong?
Edit:
According to the comments of BalusC, I am adding a real piece of code:
<h:commandLink actionListener="#{showElementBean.showElement(element)}"
value="View" > </h:commandLink>
I have a page with a list of items, and I want to add links to the page for viewing items. Thus, I need to pass this element to the display page. I am a JSF primer, for example. in Rails, I would use the GET and URL parameters, but I donβt know how to do this in the JSF-way.