> Hmm, maybe I don't understand the problem... as I understand it, cancel
> essentially has no
effect on anything in Struts unless you manually check for it and act
accordingly, correct? Or
are you saying that everything happens *except* validation?
Correct. Cancel has no effect unless you religiously check for it and do
something with it..
unless you use a DispatchAction in which the "cancelled" method is always
invoked.
> That's the part I guess I'm not clear on... how is validation bypassed? Is
> that *ALL* that is
bypassed, or is form population bypassed too?
This is the code from RequestProcessor.processPopulate:
========================================================
RequestUtils.populate(form, mapping.getPrefix(), mapping.getSuffix(), request);
// Set the cancellation request attribute if appropriate
if ((request.getParameter(Constants.CANCEL_PROPERTY) != null) ||
(request.getParameter(Constants.CANCEL_PROPERTY_X) != null)) {
request.setAttribute(Globals.CANCEL_KEY, Boolean.TRUE);
}
========================================================
According to the code the form is always populated. If the cancel button is in
the request, the
cancel request attribute is added; this is then used in processValidate() to
skip validation.
Try it yourself!! Just add "?org.apache.struts.taglib.html.CANCEL=true" to any
GET URL and your
execute() method will magically be called as if you didn't have any validation
added to your code.
Paul
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]