I am using <t:selectManyCheckbox> and <t:checkbox> for checkbox generating.
<t:selectManyCheckbox id="selectone"
value="#{templatePrescriptionMaintenanceBackingBean.objectID}" layout="spread"
styleClass="table" forceId="false" forceIdIndex="false">
<f:selectItems
value="#{templatePrescriptionMaintenanceBackingBean.selectedMedications}" />
and
<t:checkbox index="#{row}" for=":Medication:selectone"></t:checkbox>
and
private String[] objectID;
I need to get selected checkboxes in Backing Bean on some button action event.
Is there any way for this?
My Stuff:
I tried to fatch objectID from backingbean but it’s response is not unique everytime.
When I list the objectid sometimes response is proper as required (I mean it shows me selected checkboxes only) and sometime it gives list of all checkboxes regardless of selection.
for (int i = 0; i < this.getObjectID().length; i++) {
System.out.println("ObjectID is : "+this.getObjectID()[i]);
}
Any one have any clue?
Render that script conditionally.
Where
#{bean.submitted}should of course evaluatetrueonly when the submit has performed.