You can construct the URL using parameters on a link control:
<h:outputLink value="reqscope.faces">
<f:param name="id" value="#{row.id}" />
<h:outputText value="link" />
</h:outputLink>
On the target page, you can read the id from the parameter map, either directly using the expression language or via a managed bean.
View:
<f:view>
id= <h:outputText value="#{param['id']}" />
<br />
id= <h:outputText value="#{lookupBean.id}" />
</f:view>
Bean:
public class LookupBean implements Serializable {
public String getId() {
FacesContext context = FacesContext.getCurrentInstance();
ExternalContext extContext = context.getExternalContext();
Map<String, String> params = extContext.getRequestParameterMap();
return params.get("id");
}
}
faces-config.xml declaration:
<managed-bean>
<managed-bean-name>lookupBean</managed-bean-name>
<managed-bean-class>reqscope.LookupBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>