Josh Yuan

Greenhorn
+ Follow
since Mar 03, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Josh Yuan

I got a page with h:commandButton button, and when clicking on this button, page navigation to another page, but some data on this page like requestId, etc. need to be passed to the next page, what would be the general way to pass the data to next page through h:commandButton ? I have tried f:setPropertyActionListener to assign data to the target, but it doesn't seem to be working. Thanks for help in adavnce. The code example for this is copied below:

<h:panelGrid columns="2">
<h:panelGrid columns="1">
<h:outputLabel value="requestId" styleClass="outputLabel"/>
<h:inputText value="#{dataRequestAction.requestId}" label="request Id" styleClass="inputText"/>
</h:panelGrid>
<h:commandButton action="#{dataProcessAction.process}" value="Process" styleClass="button">
</h:commandButton>
</h:panelGrid>

13 years ago
JSF
I have a rich:dataTable listing data rows with a radio button for each row, but these radio buttons should belong to a single radio button group so only one row can be selected from these radio buttons. However, when I use the following code, the radio button for each row belongs to its own radio button group, please help figure out some approach to have all rows' radio buttons belong to a single radio button group. Thanks.

<rich:dataTable id="linesId" var="line" value="#{dataTableAction.lines}"
rowClasses="rowLight, rowDark" headerClass="tableHeader" styleClass="table" columnClasses="tableColumn"
cellpadding="0" cellspacing="0" border="0" width="100%">
<h:column>
<f:facet name="header">
<h:outputText value="Select" />
</f:facet>
<h:selectOneRadio id="lineRadio" layout="lineDirection">
<f:selectItem itemValue="#{line.selected}" itemLabel="">
</f:selectItem>
</h:selectOneRadio>
</h:column>
<h:column>
<f:facet name="header">
Name
</f:facet>
<h:outputText value="#{line.name}" size="25" rendered="#{line.existing}" styleClass="tableOutput"/>
</h:column>
</rich:dataTable>
13 years ago
JSF