Hi all,
I have a problem mapping my form bean to a jsp that contains javascript
to add html inputs dynamically.
I already found out that i can use BeanUtils to add the input values to
an ArrayList like this
public void setProperty(int iIndex, String inputString) {
this.propertyList.add(inputString);
}
The Problem is that there should be the chance to add whole groups of
inputs dynamically. Inside these groups single inputs also should be
reproducible. So i would have something like that in my DOM afterwards:
<input type="text" name="teachtarget[0].name" />
<textarea name="teachtarget[0].description" rows="5" cols="10"></textarea>
<select name="teachtarget[0].priority">
<option>hoch</option>
<option>mittel</option>
<option>niedrig</option>
</select>
<input type="text" name="teachtarget[0].abilities_0" />
<input type="text" name="teachtarget[0].abilities_1" />
<input type="text" name="teachtarget[0].abilities_2" />
<input type="text" name="teachtarget[1].name" /></div>
<textarea name="teachtarget[1].description" rows="5" cols="10"></textarea>
<select name="teachtarget[1].priority">
<option>hoch</option>
<option>mittel</option>
<option>niedrig</option>
</select>
<input type="text" name="teachtarget[1].abilities_0" />
<input type="text" name="teachtarget[1].abilities_1" />
<input type="text" name="teachtarget[1].abilities_2" />
I thought about putting several LabelValueBeans or LazyDynaBeans to an
ArrayList named teachtarget.
When i use
public void setTeachtarget(int index, LabelValueBean teachtargetProperty) {
this.teachtarget.add(teachtargetProperty);
}
as the set method and than try to read the list, I always receive an
empty list.
I'm wondering if I'm on the right way, I don't have an idea if this
should work or not.
If someone has any other ideas to work with two dimensional arrays (or
lists of LabelValueBeans) containing values of inputs that have been
created by javascript I would really appreciate it...
Thanks for help!
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]