I need to have a hook into processValidate() on validation failure.

Currently that can only be done by copy-and-pasting the processValidate()
method from RequestProcessor into a subclass and sticking a hook into the
middle of the code.

When I asked about this on the dev list long ago, it was confirmed that
there was no other way to do this, but that chain would eventually provide
this flexibility.

If the chain isn't configured at a fine-grain level, then it's not all that
much more functional than the existing RequestProcessor.

The chain is configured at as fine-grained a level as you like, in XML. Hubert is talking about configuring the chain programatically as well, or at least in some way independent of the configuration of the primary processing chain.


As long as you're willing to copy the base chain-config.xml file and make a few modifications, then you could simply add your own command which retrieves a value from the context under a well-known key and inspects the value to see if validation passed or not. This exact logic is the first thing executed in the CreateAction's execute method, which doesn't lookup or create an action unless the form validated.

You can start experimenting with commons-chain and struts-chain from CVS Head if you want to see what's going on. You don't have to wait for Struts 1.3.

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex


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



Reply via email to