|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.action.ValidationErrorReportResolution
public class ValidationErrorReportResolution
A resolution that streams a simple HTML response to the client detailing the validation errors
that apply for an ActionBeanContext
.
Constructor Summary | |
---|---|
ValidationErrorReportResolution(ActionBeanContext context)
Construct a new instance to report validation errors in the specified context. |
Method Summary | |
---|---|
void |
execute(HttpServletRequest request,
HttpServletResponse response)
Called by the Stripes dispatcher to invoke the Resolution. |
ActionBeanContext |
getContext()
Get the action bean context on which the validation errors occurred. |
protected String |
getResource(ResourceBundle bundle,
String name,
String fallback)
Utility method that is used to lookup the resources used for the error header, footer, and the strings that go before and after each error. |
protected void |
sendErrors(HttpServletRequest request,
HttpServletResponse response)
Called by execute(HttpServletRequest, HttpServletResponse) to write the actual
validation errors to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationErrorReportResolution(ActionBeanContext context)
Method Detail |
---|
public ActionBeanContext getContext()
public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception
Resolution
execute
in interface Resolution
request
- the current HttpServletRequestresponse
- the current HttpServletResponse
Exception
- exceptions of any type may be thrown if the Resolution cannot be
executed as intendedprotected void sendErrors(HttpServletRequest request, HttpServletResponse response) throws Exception
execute(HttpServletRequest, HttpServletResponse)
to write the actual
validation errors to the client. The header
, footer
, beforeError
and
afterError
resources are used by this method.
request
- The servlet request.response
- The servlet response.
Exception
protected String getResource(ResourceBundle bundle, String name, String fallback)
bundle
- the bundle to look up the resource fromname
- the name of the resource to lookup (prefixes will be added)fallback
- a value to return if no resource can be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |