Hi,
I figured out how to generate a form with dynamic length. The submitting
part remains a bit tricky, but before you redirect me to OGNL / Type
Conversion pages, I have to say I already read those articles.
This is a part of my generated .jsp (the generate part - I won't include the
Action code for this):
<s:iterator value="properties" status="stat">
<s:textfield name="lijst[2]" label="%{name}" />
</s:iterator>
As you can see, for testing purposes I hard-coded the index "2", but I don't
know if this syntax is correct.
This form is to be submitted to DoSearchAction:
public void setLijst(int index, String s) {
lijst[index] = s;
System.out.println(">>>> LIJST!!! >> " + index + ":::" + s);
}
When I run this piece of junk, I get: ognl.OgnlException: target is null for
setProperty(null, "2", [Ljava.lang.String;@13dd8).
I would like to know what is wrong with the setter / s:textfield name
parameter. What do I have to do to get it working?
--
View this message in context:
http://www.nabble.com/Struts-2---Dynamic-form%3A-submitting-issues-tp22755036p22755036.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]