I have a jsp page containing a rich:dataTable with some data regarding my clients.
In each row I have another rich:dataTable containing some commission rates for the current customer.
The code is something like this:
<rich:dataTable id="clientList" value="#{clientsBean.model}" var="client" rows="15">
<rich:column id="nameColumn">
<f:facet name="header">
<h:outputText value="#{msg.manageclients_client_name}" />
</f:facet>
<h:outputText id="name" value="#{client.name}" />
</rich:column>
<rich:column id="clientRatesColumn">
<f:facet name="header">
<h:outputText value="#{msg.manageclients_client_rates}" />
</f:facet>
<rich:dataTable id="clientRates" value="#{client.clientRates}" var="clientRate">
<rich:column id="clientRateProduct" sortable="true" sortBy="#{clientRate.product.qualifiedName}">
<f:facet name="header">
<h:outputText value="#{msg.manageclients_rate_product}" />
</f:facet>
<h:outputText value="#{clientRate.product.qualifiedName}" />
</rich:column>
...
</rich:dataTable>
</rich:column>
...
</rich:dataTable>
As you can see the embedded rich:dataTable (id=clientRates) contains a sortable column (id=clientRateProduct).
My problem is that if I click on the sort icon in the clientRateProduct column for the current client all clientRates dataTables will be sorted (not just the one for the current client).
I want the sort action to be performed just on the current clientRates dataTable. Can anybody please suggest a solution ?
I use RichFaces 3.2.2.SR1. & Tomcat 6.0.29