• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing parameters from previous page in backing bean of next page  RSS feed

M Sundar
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In page1.xhtml, I have the following
<ui:include src="/metrics.xhtml">
<ui:param name="recordID" value="100"/>

In metrics.xhtml, I have the following:
<hutputText value="#{recordID}" />

The above works just fine, and the value 100 shows up in the metrics.xhtml page.

But I need to access the parameter "recordID" in the backing bean of metrics.xhtml. So I tried the following and always seem to be getting a null value:
String recordID = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("recordID");

Any inputs on what I am doing wrong would help? I am using JSF 1.2, Facelets 1.1.5, Tomahawk 1.1.9.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!