How to get each CheckBox value inside a WORepetition Bind to the same variable
How to get each CheckBox value inside a WORepetition Bind to the same variable
- Subject: How to get each CheckBox value inside a WORepetition Bind to the same variable
- From: email@hidden
- Date: Thu, 16 Jun 2011 15:23:19 +0200 (CEST)
- Message-context: email-message
Hi,
I have a little problem with checkBoxes values. I have a checkBox which is in a WORepetition and bind to one String variable.
in html :
...
<webobject name = "masterList">------>WORepetition
<webobject name = "masterCheck" />------>Check Box
<webobject name = "masterLib" /><br />------> WORepetition item label
</webobject>
...
in wod :
...
masterList : WORepetition {
list = masters;
item = master;
}
masterLib : WOString {
value = master.descFr;
}
masterCheck : WOCheckBox {
class = "texte";
name = "master";
selection = selectedMaster; ----->Variable bind to check box value
value = master.diplSpecAbr; --->CheckBox value
onclick = "MstChecked(this.form)";----> JS function wo call a java method to get checkbox value
..
in Browser :
...
<br />
<input onclick="MstChecked(this.form)" class="texte" type="checkbox" value="CV MAST" name="master" />Convention Master (CV MAST)<br /> =====>bind to selectedMaster
<input onclick="MstChecked(this.form)" class="texte" type="checkbox" value="IM" name="master" />Ingénierie et management (IM)<br /> =====>bind to selectedMaster
<input onclick="MstChecked(this.form)" class="texte" type="checkbox" value="MP" name="master" />Mécanique et Physique (MP)<br /> =====>bind to selectedMaster
<input onclick="MstChecked(this.form)" class="texte" type="checkbox" value="STIC" name="master" />Sciences et Technologies de l'information et de la communication (STIC) =====>bind to selectedMaster
<br />
...//All CheckBoxes value are bind to the same variable java side. I can't check all
So when I execute my apps WORepetition return some CheckBoxes which correspond of object's number listed. And theses CheckBoxes are Bind to the same variable.
In html when I check all checkBoxes there are no problem but java side I have very very big problem to work with the value of theses checkBoxes.
How can I turn my code to allow one variable to have one checkBox?
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden