Board index JavaServer Faces General multiple check box selection does not clear

multiple check box selection does not clear

Components, Ajax Framework, Utilities and More.


Posts: 1
http://www.primefaces.org/showcase/ui/d ... eckbox.jsf

I have a data table with above design, multiple selection check box with added sort by feature. When the data table is sorted, the individual data row check boxes that you have selected are cleared except for the check all main checkbox at the header. Is there an ajax method that will clear the check all checkbox?

Here is the example what I have.

<p:dataTable var="car" value="1" paginator="true" rows="10"
>

<f:facet name="header">
Checkbox Based Selection
</f:facet>

<p:column selectionMode="multiple" />

<p:column headerText="Model" sortBy="#{table.test}">
<h:outputText value="test" />
</p:column>

<p:column headerText="Year" sortBy="#{table.test}">
<h:outputText value="test" />
</p:column>

<p:column headerText="Manufacturer" sortBy="#{table.test}">
<h:outputText value="test" />
</p:column>

<p:column headerText="Color" sortBy="#{table.test}">
<h:outputText value="test" />
</p:column>

<f:facet name="footer">
<p:commandButton value="View" image="ui-icon ui-icon-search"
update="displayMulti" oncomplete="multiCarDialog.show()"/>
</f:facet>
</p:dataTable>

using primefaces 2.2.1.
Thanks in Advance.

Return to General