I have the following code in my backing bean :
public class FSBean
{
private CoreTable summaryBinding;
public String searchDetails()
{
FS selectedTransactionId =
(FS) summaryBinding.getRowData();
}
public void setSummaryBinding(CoreTable summaryBinding)
{
this.summaryBinding = summaryBinding;
}
public CoreTable getSummaryBinding()
{
return summaryBinding;
}
}
In my JSF I have:
<h:form>
<tr:panelHeader styleClass="titleText" text="Results"/>
<tr:table styleClass="tableBody" emptyText="No Match Found" rows="15"
binding="#{fsBean.summaryBinding}" rowBandingInterval="1"
value="#{disp}">
<tr:column align="center" headerText="Roll No">
<h:commandLink value="#{disp.rollNo}"
action="#{fsbean.searchDetails}"/>
</tr:column>
The problem is that when the search returns 2 rows and one of the hyperlink
is clicked in the table then in my Logs I see that both the rows called the
serachDetails() method. And also on the next page always the details of the
first row in the database is displayed. irrespective of which row is clicked
on the JSF.
Regards,
Gaurav Shekher
Information Analyst