I want to transfer a parameter from a jsf page to another jsf page. Like this:
a.xhtml
<h:form>
<h:commandLink class="navi" value="press"
action="#{Bean.action}">
<f:param name="id" value="5555" />
</h:commandLink>
</h:form>
Bean.java
public String action() {
HttpServletRequest request = (HttpServletRequest) FacesContext
.getCurrentInstance().getExternalContext().getRequest();
String param = request.getParameter("id");
return "b?id=" + param;
}
b.xhtml
<h:inputText value=#{param.id} />
By previous way, I transfer id from a.xhtml to b.xhtml, but I don't want to expose the parameter like "...b.xhtml?id=5555" outside because of this line:
return "b?id=" + param;
And the scope of ManagedBean is request. How can I do to solve this problem? Thanks.
flash
object. – skuntsel