I'm pretty sure that anything that can be populated by the
ParameterInterceptor using an Ognl expression can be referenced in the
VisitorFieldValidator, but, again, the error messages won't necessarily
be correct... I don't think you need the "${}" around displayOrder, as
Ognl should try to figure out what that value represents. I would
suggest you play with it and step through, looking at what it's doing.
You may need to take the code from the VisitorFieldValidator and run
with it on your own, I'm not sure. 

Keep us apprised of your progress... It sounds like you're doing some
very complicated things :-)

Jason

-----Original Message-----
From: Peter White [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 14, 2003 1:16 PM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] VisitorFieldValidator question

Hi Jason,

Thanks for the reply. Due to the dynamic nature of our submit form, our
field naming is as follows:

that[${displayOrder}].Vehicle.yearManufactured
that[${displayOrder}].Vehicle.manufacturer
that[${displayOrder}].Vehicle.vehicleModel
that[${displayOrder}].PrimaryBorrower.firstName
that[${displayOrder}].PrimaryBorrower.lastName
that[${displayOrder}].PrimaryBorrower.socialSecurityNumber
.
.
.

Our model is currently being populated correctly via the model-driven
interceptor, thanks to a tip from Matt Ho, but we're definitely stuck at
the
validation phase. Is it possible to use the VisitorFieldValidator with
the
XML validation files given the dynamic ordering of classes within the
List
being validated? I'm assuming we'd have to have some way of wild-carding
the
"displayOrder" for this to work. If the VisitorFieldValidator is not
well-suited for this type of workflow, can you suggest any other ways of
doing this?

Our plan, if the VisitorFieldValidator won't do the trick, is to dig
through
the VisitorFieldValidator and related validation source code to see how
to
pass the validator's context to our own validate() method within each of
the
List's components. Once we have that, I'm assuming we can then call
validationContext.addFieldError() within each of the validated
components'
validate() methods to have the errors propagate back to the UI.

Thanks!
Peter

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Jason Carreira
> Sent: Tuesday, October 14, 2003 8:25 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] VisitorFieldValidator question
> 
> You would apply the VisitorFieldValidator to the field 
> "model"... The problem with this is that validation errors 
> will be added as "model.field1", whereas you can access the 
> model fields in your page as just "field1", so the error 
> messages won't be displayed next to the fields (or at all 
> unless you specifically look for them).
> 
> Usually if you're using ModelDriven, you'd want to put your 
> validations in your Action's validation.xml... 
> 
> -----Original Message-----
> From: Bryan White [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 13, 2003 8:51 PM
> To: WebWork
> Subject: [OS-webwork] VisitorFieldValidator question
> 
> Hello all,
> 
> Is it possible to have the VisitorFieldValidator validate my 
> model, if I'm using the model-driven interceptor?
> If so, what steps do I need to take to get that working?
> 
> Thanks in advance,
> 
> Bryan White
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to