You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antoine-Bruno SARRANT <bs...@improve.fr> on 2001/07/13 17:09:26 UTC
Got a problem with the tag
Hi everobody !
i have to generate dynamic checkboxes and got the following problem : when
i checked one or more checkbox(es), i realized that i didn't set the
property which is a String [].
When i inspect my code with the VAJDebugger, i saw the STRUTS introspection
mechanism didn't find my set method, so it's natural that my table isn't
not setted
My questions are :
- First : did i make a mistake in my JSP syntax ?
- Second : Is <html:multibox> not stable
- Third : i'm working on VAJ 3.5.3 so is it a JVM problem ?
Here are the different aspects of my code :
The iterate loop from my JSP :
<logic:iterate name="fieldsOfInterest" indexId="id" id="areasOfInterest">
<html:multibox property='<%="fieldsOfInterest[" + id + "]"%>'>
<bean:write name="areasOfInterest" property="areasOfInterest"/>
</html:multibox>
<bean:write name="areasOfInterest" property="areasOfInterest"/>
</logic:iterate>
Note that the bean "areasOfInterest" contains the different project names
and fieldsIfInterest is my BeanForm
and here you got my java code for the getter and setter :
protected String[] fieldsOfInterest = new String[20];
public String[] getFieldsOfInterest() {
return fieldsOfInterest;
}
public void setFieldsOfInterest(String newFieldsOfInterest, int index) {
fieldsOfInterest[index]= newFieldsOfInterest;
}
For The Action, it only do a forward.
thanks for advices...