Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF - redirect with parameter

843844Jun 27 2008 — edited Jun 27 2008
Hi All,

I have a JSF application that is consists of 5 pages. The first one is clear JSP page where the user have the possibility to logged in the application. After the user has been successfully authorized the JSF page redirects to JSF page that displays list of items.So far so good, but when the list of items contains only one item I want to redirect directly to the third page that displays the description of the selected item from the second page. The second page pass the item id with the following code:
	<h:commandLink action="ItemDescription" actionListener="#{itemDesc.processAction}">
		<f:param name="item_id" value="#{MyItem.id}"></f:param>
		<h:outputText value="#{MyItem.name}"></h:outputText>
	</h:commandLink>
Currently I can redirect to the third page by using FacesContext.getCurrentInstance().getExternalContext().redirect("Third.faces") but I don't know how to set the parameter item_id.

Do you have any suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2008
Added on Jun 27 2008
1 comment
254 views