我有一个丰富的:数据表,其中有很多列,其中一列是 h:selectbooleancheckbox。我希望用户一次只从数据表中的许多复选框中选择一个复选框。如果一个复选框被选中一次,我没有问题我可以将它提交到表单。When a second checkbox is selected, for example, the former one should be deselected. 我怎么能这样做?提前感谢您的帮助......这是我正在使用的数据表:
<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;">
<rich:column id="col1" width="10px" headerClass="dr-table-header rich-table-header">
<f:facet name="header">
</f:facet>
<h:selectBooleanCheckbox title="#{general.select}" >
</h:selectBooleanCheckbox>
</rich:column>
<rich:column id="col2" label="#{general.vehicleName}" headerClass="dr-table-header rich-table-header" >
<f:facet name="header">
<h:outputText value="#{general.vehicleName}" id="vehicleNameLbl" />
</f:facet>
<h:outputText value="#{vhcl.vehicle.vehicleName}" id="vehicleNameValue" />
</rich:column>
<rich:column id="col3" label="#{general.vehicleType}" headerClass="dr-table-header rich-table-header" >
<f:facet name="header">
<h:outputText value="#{general.vehicleType}"
id="state_capital" />
</f:facet>
<h:graphicImage value="#{vhcl.typeImage}" height="40" width="40" align="left"/>
</rich:column>
<rich:column id="col4" label="#{general.lastMessageDate}"
headerClass="dr-table-header rich-table-header" >
<f:facet name="header">
<h:outputText value="#{general.lastMessageDate}" id="lastMsgDateLabel" />
</f:facet>
<h:outputText value="#{vhcl.messageDate}" id="lastMsgDate" />
</rich:column>
<rich:column id="col5a" label="#{general.address}"
headerClass="dr-table-header rich-table-header" >
<f:facet name="header">
<h:outputText value="#{general.address}" id="addressLabel" />
</f:facet>
<h:outputText value="#{vhcl.address}" id="addr" />
</rich:column>