>
>Well, that's not true. You can call "isCommand(<name>)" to determine
>which command is being invoked.
>

Hmm... this must me something new, as this was not in there originally. This 
being the case, I see no problem in automatically calling validate from 
execute in all cases (cda/non cda).

>
>>I have recently done integration with formproc. Amazingly it's just one
>>class and requires no changes to WW. I'll commit tonight if you guys
>>like the idea.
>
>Can you give us an example here first?
>

Sure..

First, read this page first

http://formproc.sourceforge.net/docs/guide.html

so you become familiar with the feature...


formproc has the concept of defining a form in an xml file, so I created a 
GenericValidator class that can be invoked from any action that extends 
ActionSupport, like this.. inside your doValidation() just have a single 
line:

GenericValidator.validate(this,formName,getLocale());

This simple call will validate your form according to your formproc form 
definition based on the formName you specify. Upon returning, if there was 
an error, error messages (if any) will be populated inside the action just 
like if you had done the validation manually.

I have a special lightweight version of formproc that doesn't use any of the 
dependencies of the original one (as the original one requires edenlib, 
xerces, jdom [blah!]).

This is all part of my personal stash, so if you have no use for this or 
find that reinventing the wheel is much better, that's ok :)

/V

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


_______________________________________________
Webwork-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webwork-user

Reply via email to