Still plugging away at Validation, having the following problem:

I've got an indexed field I want to validate.  By trial and error, I've 
discovered the indexedProperty and indexedListProperty params to the field tag.

  <field property="fortisDepFacility" 
indexedListProperty="fortisDepFacility" depends="mask">

The field is defined in the DynaForm as:
          <form-property name="fortisDepFacility" type="java.lang.String[]"
                          initial="{'','','','','','','','','',''}"/>

Unfortunately, some strategic print statements show that this turns into 
the following property when invoking the VA:
fortisDepFacility[0].fortisDepFacility

Which obviously isn't going to work.

This leads to a paradox in my mind.  DynaForms only want to code for 
non-complex types (Strings, arrays of strings, etc).  This means that you 
can't  code a complex object that could take a parameter as a DynaForm 
type.  So how do you make it work with the validator.  The only way that 
the indexed code gets triggered in Validator.validate() is if 
indexedListProperty is set (indexedProperty seems to do bupkis in the code, 
BTW)

I would assume that what validate() wants to hand to 
StrutsValidator.validateMask is "fortisDepFacility[0]".  Has anyone gotten 
this to work successfully, or is this untried code?  I noticed that the 
O'Reilly book chapter doesn't do more than list the fact that 
indexedListProperty is available, there's no example or documentation given.

James


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

Reply via email to