-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul,
Strachan, Paul wrote:
> A request scoped "out of the box" DynaValidatorForm is also unable to
> handle indexed properties e.g. throws IndexOutOfBoundsException in
> DynaActionForm.get(string, int)
I've never used get(String, int), but I use request-scoped indexed
properties all the time and use getStrings(String) just fine in that case.
My setup in struct-config.xml:
<form-bean name="questionSetForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="id" type="java.lang.String" />
<form-property name="name" type="java.lang.String" />
<form-property name="description" type="java.lang.String" />
<form-property name="addQuestionId"
type="java.lang.String[]" />
<form-property name="deleteQuestionId"
type="java.lang.String[]" />
</form-bean>
Part of my form-handler action:
// Add and remove the appropriate questions.
List questions = getQuestionList(existingQuestions,
questionSetForm.getStrings("addQuestionId"),
questionSetForm.getStrings("deleteQuestionId"));
If you are getting IndexOutOfBoundsException, then your loop might be
running too long. How are you determining what the maximum index is that
you can use?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFeXZH9CaO5/Lv0PARAk8cAKDAtrEWWH1nl34JU75mKkGfh+IPswCffh6X
56p3VYmREkJLNH5by0RVysM=
=yUyl
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]