|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.stripes.action.ActionBeanContext
public class ActionBeanContext
Encapsulates information about the current request. Also provides access to the underlying Servlet API should you need to use it for any reason.
| Constructor Summary | |
|---|---|
ActionBeanContext()
|
|
| Method Summary | |
|---|---|
String |
getEventName()
Supplies the name of the event being handled. |
Locale |
getLocale()
Gets the Locale that is being used to service the current request. |
HttpServletRequest |
getRequest()
Retreives the HttpServletRequest object that is associated with the current request. |
HttpServletResponse |
getResponse()
Retrieves the HttpServletResponse that is associated with the current request. |
Resolution |
getSourcePageResolution()
Returns a resolution that can be used to return the user to the page from which they submitted they current request. |
ValidationErrors |
getValidationErrors()
Returns the set of validation errors associated with the current form. |
void |
setEventName(String eventName)
Used by the DispatcherServlet to set the name of the even being handled. |
void |
setRequest(HttpServletRequest request)
Used by the DispatcherServlet to set the HttpServletRequest for the current request |
void |
setResponse(HttpServletResponse response)
Used by the DispatcherServlet to set the HttpServletResponse that is associated with the current request. |
void |
setValidationErrors(ValidationErrors validationErrors)
Replaces the current set of validation errors. |
String |
toString()
Returns a String with the name of the event for which the instance holds context, and the set of validation errors, if any. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ActionBeanContext()
| Method Detail |
|---|
public HttpServletRequest getRequest()
public void setRequest(HttpServletRequest request)
request - the current requestpublic HttpServletResponse getResponse()
public void setResponse(HttpServletResponse response)
response - the current responsepublic String getEventName()
public void setEventName(String eventName)
eventName - the name of the event being handledpublic ValidationErrors getValidationErrors()
public void setValidationErrors(ValidationErrors validationErrors)
validationErrors - a collect of validation errorspublic Locale getLocale()
LocalePickerpublic Resolution getSourcePageResolution()
Returns a resolution that can be used to return the user to the page from which they submitted they current request. Most useful in situations where a user-correctable error has occurred that was too difficult or expensive to check at validation time. In that case an ActionBean can call setValidationErrors() and then return the resolution provided by this method.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||