Ted Husted wrote:

This is really a USER list question, but you may be looking for the indexed properties how-to:

http://jakarta.apache.org/struts/faqs/indexedprops.html

I posted to the user list, but as yet I have had no reply. Searching google and the mailing list archives has shown other people having the same problem, but no solutions posted.


Is it possible to use an indexed property inside a DynaActionForm, and have the DynaActionForm populated correctly on submit?

The HTML form is submitted with element names of the form "id[index].property", the trouble is that when this form is submitted, and struts is tasked with populating the DynaActionForm bean, this bombs out like so:

java.lang.ArrayIndexOutOfBoundsException
at java.lang.reflect.Array.set(Native Method)
at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:459)
at org.apache.commons.beanutils.PropertyUtils.setIndexedProperty(PropertyUtils.java:1414)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1013)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1104)


Is this a struts bug, or am I doing this wrong?

Regards,
Graham
--


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to