You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2006/04/05 21:55:32 UTC
DO NOT REPLY [Bug 38374] - Validation always skipped with Globals.CANCEL_KEY
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38374>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38374
rleland@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From rleland@apache.org 2006-04-05 20:55 -------
Our class SaveAction performs a forward to a EditAction when isCancelled() is
true.
Because the CANCEL_KEY is still in the request
an InvalidCancelException() is thrown before we get to the new EditAction.
It's ugly for EditAction to know who could possibly forward to it,
So placing a
<set-property property="cancellable" value="true"/>
In all the EditActions mappings seems a little confusing and non-intuative,
There needs to be a clean way to cleanup this attribute, and I beleive
it should be the SaveAction() in this case.
One possible changes would be to provide a method similar to isValidToken()
that explicitly clears the CANCEL_KEY attribute
protected boolean isCancelled(HttpServletRequest request, boolean remove) {
boolean cancelled = isCancelled(request);
if (cancelled && remove) {
request.removeAttribute(Globals.CANCEL_KEY);
}
return (cancelled);
}
Another method that is a little more involved would be to add an attribute
in the controller declaration that says to clean up the CANCEL_KEY before
performing a forward.
-Rob
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org