com.tonbeller.wcf.form
Class ButtonHandler
java.lang.Object
com.tonbeller.wcf.form.ButtonHandler
- All Implemented Interfaces:
- NodeHandler, RequestListener
- public class ButtonHandler
- extends java.lang.Object
- implements NodeHandler, RequestListener
Default ButtonHandler.
TODO should be unified with ActionReference Code!
Supports the following attributes
- action="revert"
-
calls revert() on the
Form
, i.e. formats
the data from the bean for presentation.
- action="validate"
-
calls validate() on the
Form
, i.e. parses
user input and writes the values to the bean properties
- forward="/some/page.jsp"
-
if validation succeeds forwards to another page. Paramers make sense here.
- hide="true"
-
if validation succeeds hides the component
- successAttr="name-of-request-attribute"
-
if validation succeeds a request attribute with value
true
is created.
- scroller="true"
-
keeps the current browser window scroll position after the
request is finished
- Author:
- av
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_ACTION
public static final java.lang.String NO_ACTION
- See Also:
- Constant Field Values
VALIDATE_ACTION
public static final java.lang.String VALIDATE_ACTION
- See Also:
- Constant Field Values
REVERT_ACTION
public static final java.lang.String REVERT_ACTION
- See Also:
- Constant Field Values
ButtonHandler
public ButtonHandler()
initialize
public void initialize(RequestContext context,
XmlComponent comp,
org.w3c.dom.Element element)
- Description copied from interface:
NodeHandler
- initializes the handler
- Specified by:
initialize
in interface NodeHandler
- Parameters:
context
- the current requestelement
- the element that this handler is responsible for
destroy
public void destroy(javax.servlet.http.HttpSession session)
- Specified by:
destroy
in interface NodeHandler
request
public void request(RequestContext context)
throws java.lang.Exception
- calls revert/validate on the form and sets the next view
- Specified by:
request
in interface RequestListener
- Parameters:
context
- the current request
- Throws:
java.lang.Exception
render
public void render(RequestContext context)
throws java.lang.Exception
- does nothing
- Specified by:
render
in interface NodeHandler
- Throws:
java.lang.Exception