webwork.action
Class ResultException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bywebwork.action.ResultException
All Implemented Interfaces:
java.io.Serializable

public class ResultException
extends java.lang.Exception

If Actions throw this exception from execute(), the dispatcher will show the view corresponding to the chosen result. This is primarily useful for certain types of checking. For example, if an action can only be executed if the client is logged in, he can have a method "checkLogin", which checks the login status and throws ResultException if not logged in. The view would then be the login screen, and "checkLogin" should be called first in the action's execute() method.

Version:
$Revision: 1.7 $
Author:
Rickard Öberg (rickard@middleware-company.com), Matt Baldree (matt@smallleap.com)
See Also:
Action, Serialized Form

Constructor Summary
ResultException(java.lang.String aResult)
           
ResultException(java.lang.String aResult, java.lang.String message)
           
 
Method Summary
 java.lang.String getMessage()
           
 java.lang.String getResult()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultException

public ResultException(java.lang.String aResult)

ResultException

public ResultException(java.lang.String aResult,
                       java.lang.String message)
Parameters:
aResult - the result view; i.e. - ERROR, INPUT, etc
message - the error message
Method Detail

getResult

public java.lang.String getResult()

getMessage

public java.lang.String getMessage()


Copyright © 2001-2003 WebWork All Rights Reserved.