Eddie, Perfect!!! A How-To can be as simple as "Look here, and Here and Here". Thanks!!! Your How-TO is much appreciated. :)
-James -----Original Message----- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 7:44 AM To: Struts Users Mailing List Subject: Re: Oh my gosh! LOL - It's actually kind of all "declarative" in a way. Have you read the stuff Chuck wrote on this topic? That's where I got my footing at :-) Go dig into Chapter 11 (I think it's 11) of Chuck's book and _really_ dig into it - and then let us know if you have problems ;-) I'm just making use of what Dave has in validation-rules.xml and have pruned (ok, massacred!) validation.xml down to just what I wanted. Initially, I just started (after reading Chuck's chapter) coding in a super-simple form from the dyna-forms examples. Once I was satisfied I understood that (nope - never used them before - always coded them - no more!), I then changed it to a dyna validator form - with absolutely no validation associated with it. Then, I incrementally built it - adding "depends='required'" to everything that needed it, adding masks for things that needed them. I had seen several people were having issues with how Dave had done the JS, and so I didn't want to over-load myself. All in all, the form validation rules remind me of ant tasks sorta-kinda. I guess the only similarity is really the depends= attribute ... but I always tend to think "ant" when I look at that file. The concept is the same - well kind of. David builds up constructors for each requirement (in JavaScript that is) that is placed upon a given field. For instance, all "required" fields are grouped together into a "required()" constructor. This constructor builds up a collection of objects that he then iterates over. Since each of the items in the collection has it's own validation rules, he just iterates over the collection and validates as he goes. He then does the same thing with masks (in my case). It's pretty neat, really :-) Having written enough JavaScript to be "semi-comfortable" with what the output from Validator really helped me understand what was going on. It's amazing what you get when you "View Source" on a page with a form controlled by the Validator. Ok - maybe not amazing - but it sure is neat :-) If you have any specific questions/issues, I'd be glad to try to answer them. I highly recommend Chuck's chapter on it though. Regards, Eddie James Ward wrote: >Can you write the How-To or give us some code examples? I want to be >as blessed too! > >-James > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

