This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing parameters from JSF to Java class and JSF to JSF  RSS feed

Rohit Kumar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a datatable with and I need to pass 2 parameters - one to java class and other to next JSF.
Below is my code..

<h:dataTable value="#{application.applications}" var="cipDetailed" headerClass="list-header"
rowClasses="list-row" styleClass="list-background">
<f:facet name="header">
<hutputText value="Year"/>
<hutputText styleClass="user" value="#{cipDetailed.fiscalYear}">
<f:facet name="header">
<hutputText value="Project Description"/>
<h:commandLink immediate ="true">
<f:param name="cipIdValue" value="#{cipDetailed.cipId}" /> // 1st parameter
<f:param name ="save" value = "save" />//2nd parameter
<hutputText styleClass="user" value="#{cipDetailed.comments}"/>

I need to send 1st parameter to Java class which is working fine..and I am doing like this
FacesContext Ctx = FacesContext.getCurrentInstance();
Map Params = Ctx.getExternalContext().getRequestParameterMap();
String cipIdValue = (String) Params.get("cipIdValue");

For the 2nd parameter..i need to pass it to next JSF. How do I do this´┐Żany suggestions
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!