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:
Stepping through this with the debugger, I can confirm that the answer is no: it is not possible.
The problem exists inside commons-beanutils:
The logic of Beanutils.setProperty() goes like this:
- Check if property name contains a ".". (In our case, id[34].property does, so true)
- If true, try search for a property called "id[34]". This property does not exist, so bomb out and ignore it.
- Check if the bean is an instance of DynaBean. (In our case it's too late - we already bombed out above).
At this point the loops iterates again, and the indexed option is ignored.
Can someone check whether my understanding of this is correct? It's really late... so I could be reading this wrong.
Regards, Graham --
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
