Note that there are some explanatory texts on larger screens.

plurals
  1. POenable single h:selectbooleancheckbox from many inside rich:datatable in JSF
    primarykey
    data
    text
    <p>I have a rich:datatable in which I have many columns and one of the columns is h:selectbooleancheckbox. I want the users to select just one of the checkboxes at a time from those many chechboxes in the datatable. If a checkbox is selected once, I have no problem I can submit it to the form. When a second checkbox is selected, for example, the former one should be deselected. How I can do that? Thank you in advance for your help... Here is the datatable that I am using:</p> <pre><code>&lt;rich:dataTable id="vehicleTable" var="vhcl" value="#{tripsBacking.vehicleList}" binding="#{tripsBacking.vehicleTable}" sortMode="single" footerClass="dr-table-footer rich-table-footer" style="width: 500px; margin: 0px; padding: 0px;"&gt; &lt;rich:column id="col1" width="10px" headerClass="dr-table-header rich-table-header"&gt; &lt;f:facet name="header"&gt; &lt;/f:facet&gt; &lt;h:selectBooleanCheckbox title="#{general.select}" &gt; &lt;/h:selectBooleanCheckbox&gt; &lt;/rich:column&gt; &lt;rich:column id="col2" label="#{general.vehicleName}" headerClass="dr-table-header rich-table-header" &gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{general.vehicleName}" id="vehicleNameLbl" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{vhcl.vehicle.vehicleName}" id="vehicleNameValue" /&gt; &lt;/rich:column&gt; &lt;rich:column id="col3" label="#{general.vehicleType}" headerClass="dr-table-header rich-table-header" &gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{general.vehicleType}" id="state_capital" /&gt; &lt;/f:facet&gt; &lt;h:graphicImage value="#{vhcl.typeImage}" height="40" width="40" align="left"/&gt; &lt;/rich:column&gt; &lt;rich:column id="col4" label="#{general.lastMessageDate}" headerClass="dr-table-header rich-table-header" &gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{general.lastMessageDate}" id="lastMsgDateLabel" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{vhcl.messageDate}" id="lastMsgDate" /&gt; &lt;/rich:column&gt; &lt;rich:column id="col5a" label="#{general.address}" headerClass="dr-table-header rich-table-header" &gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="#{general.address}" id="addressLabel" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{vhcl.address}" id="addr" /&gt; &lt;/rich:column&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload