webwork/src/main/webwork/action ActionSupport.java,1.27,1.28
[email protected] Sat, 18 May 2002 11:31:55 -0700
| Newsgroups | gmane.comp.java.webwork.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/webwork/webwork/src/main/webwork/action
In directory usw-pr-cvs1:/tmp/cvs-serv26817
Modified Files:
ActionSupport.java
Log Message:
added logic in execute to handle result exception from filter
Index: ActionSupport.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/ActionSupport.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- ActionSupport.java 26 Apr 2002 19:33:54 -0000 1.27
+++ ActionSupport.java 18 May 2002 18:31:52 -0000 1.28
@@ -64,6 +64,15 @@
}
// Action implementation -----------------------------------------
+ /**
+ * Execute will first check the request for a result exception. If one
+ * is found, then it will add its message as an error message and throw
+ * the ResultException. If there no exception is found, then it will
+ * invoke the "command" - invokeCommand(). If we are not invoking a command,
+ * it will call validate() and then doExecute().
+ *
+ * @return view
+ */
public String execute()
throws Exception
{
@@ -75,6 +84,14 @@
try
{
+ //check to see if there already is a result exception.
+ //if so, add its message as an error message and throw it
+ ResultException re = (ResultException) ActionContext.getContext().getRequest().getAttribute("webwork.result.exception");
+ if (re != null) {
+ addErrorMessage(re.getMessage());
+ throw re;
+ }
+
// Check whether command is being invoked
if(command!=null && !command.equals("") && this instanceof CommandDriven)
{
_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/