Matt,

In my case, it wouldn't be very useful to provide the source code for my workaround as it would require too much background information. However, here is a summary of what I did to validate my second level of nested properties...

First, I use the Validator to validate as much of the form as possible. This includes all first level data as well as the first level of nested indexed properties. To do this, I call super.validate(mapping, request) first thing in my ValidatorForm validate() method. I then proceed to find and validate all the second level nested index properties in the form and validate them according to my own custom validation rules.

You don't have to use custom validation schemes, because you can use the validation rules from the Validator. I haven't progressed to this point because I haven't had time. I'm also hoping that nested validation will come along "soon." Since I already have my own validation code in place and it's working, I have to get on with other things.

If anyone has further questions, I'd be happy to help if I can.

TR

Matt Bathje wrote:
Unfortunatley not, because my workaround was to re-work the class so it wasn't necessary. The user interface for that area became a little bit "clunkier" but it was the quickest thing to do at the time.

Matt



Terry Roe wrote:

Matt,

Thank you for your comments. Could you point me to where you posted your workaround for nested validation?

Thanks,

TR

Matt Bathje wrote:

Might I suggest (to everybody, not just Terry) that when you come up with a solution to these or other things, you either put it into the struts wiki (http://wiki.apache.org/struts) Or do it in a generic enough manner that you can put in a bugzilla report with the new code, and it could be added to the base code.

This way future developers will not need to share your frustrations. I kow when I ran into both of these problems on my projects in the past I either worked around it (nested validation) Or said "oh well, we'll deal with it later" (indexed js validation)


Matt

Terry Roe wrote:

Jonathan,

Yes, I would be very interested in learning more about number one on the list (handle nested indexed lists). I'd also like to know if she ever looked into JavaScript validation of indexed properties. That's another item that I've posted here. I did receive a response that it is basically "stubbed out" in the current validation code. If you have indexed properties, no JavaScript validation for them.


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




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



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




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



Reply via email to