This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSF and the fly likes passing parameters from JSF to Java class and JSF to JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "passing parameters from JSF to Java class and JSF to JSF" Watch "passing parameters from JSF to Java class and JSF to JSF" New topic
Author

passing parameters from JSF to Java class and JSF to JSF

Rohit Kumar
Ranch Hand

Joined: Jul 19, 2007
Posts: 35
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">
<h:column>
<f:facet name="header">
<hutputText value="Year"/>
</f:facet>
<hutputText styleClass="user" value="#{cipDetailed.fiscalYear}">
</hutputText>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="Project Description"/>
</f:facet>
<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}"/>
</h:commandLink>
</h:column>

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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: passing parameters from JSF to Java class and JSF to JSF
 
It's not a secret anymore!