<rich:dataTable> sorting on select box are not working properly
jayaramimca Feb 15, 2013 12:50 PMHi Team,
I trying to impliment the inbuilt sorting mechansim on checkbox where as the sorting is not working prperly.
Issue:
Select one or more record from diffrent page, then apply the on the basics of check box, then deselect all the checked on, again apply the sort and now selct some record by checking the select box.
Now you will see the selected record is not appearing rather than some other value which was intaily present in that place is coming.
My code is as below:
<h:panelGroup id="multiSelectPanelGrp">
<rich:dataTable id="multiselectdatatable" value="#{data}" var="e"
rows="10" style="width:100%">
<rich:column sortBy="#{e.obj[select]}" sortable="true">
<f:facet name="header">
<h:outputText value=" " />
</f:facet>
<h:selectBooleanCheckbox value="#{e.select}"
disabled="#{e.disable}" style="border:0;padding:0;margin: 0;">
<c:if test="#{not empty disableEnableSelects}">
<a4j:support event="onclick"
action="#{actionBean[disableEnableSelects]}"
reRender="multiselectdatatable">
<f:setPropertyActionListener value="#{e.obj}"
target="#{actionBean[selectedRowObj]}" />
</a4j:support>
</c:if>
<c:if test="#{empty disableEnableSelects}">
<a4j:support event="onclick">
</a4j:support>
</c:if>
</h:selectBooleanCheckbox>
</rich:column>
<rich:column filterMethod="#{lookupBean.filterMethod}"
sortBy="#{e.obj[dispColumn]}" sortable="true">
<f:facet name="header">
<h:outputText
value="#{empty dispColumnLabel ? '': bundle[s:concat(dispColumnLabel,'.label')]} " />
</f:facet>
<h:outputText value="#{e.obj[dispColumn]}" />
</rich:column>
<rich:column rendered="#{not empty dispColumnTwo}"
sortable="true" sortBy="#{e.obj[dispColumnTwo]}">
<f:facet name="header">
<h:outputText
value=" #{empty dispColumnLabelTwo ? '':bundle[s:concat(dispColumnLabelTwo,'.label')]} " />
</f:facet>
<h:outputText value="#{e.obj[dispColumnTwo]}" />
</rich:column>
<rich:column rendered="#{not empty dispColumnThree}"
sortable="true" sortBy="#{e.obj[dispColumnThree]}">
<f:facet name="header">
<h:outputText
value=" #{empty dispColumnLabelThree ? '':bundle[s:concat(dispColumnLabelThree,'.label')]} " />
</f:facet>
<h:outputText value="#{e.obj[dispColumnThree]}" />
</rich:column>
</rich:dataTable>
<rich:datascroller id="multiSelectPanelDataScroll"
for="multiselectdatatable" renderIfSinglePage="false"
maxPages="10" page="#{lookupBean.defaultPageNoInt}" />
Any Help will be appriciated.
Thanks,
Jayaram