nl.gx.webmanager.handler.forms.routing
Class GoToRouter
java.lang.Object
nl.gx.webmanager.handler.forms.routing.GoToRouter
- All Implemented Interfaces:
- FormComponent, Router
public class GoToRouter
- extends java.lang.Object
- implements Router
Prerouter for redirecting to a url, specified in the parameters of the router.
| Variable |
Type |
Mode |
Default |
Description |
| endofflow |
Parameter |
Required |
false |
If true, the flow XML will be removed from session. |
| page |
Parameter |
Optional |
- |
Route to this page. You can set an XSL precondition in GX WebManager: e.g.
count(/handler/flow/formelement/error[@code='wrongcombination']) > 0 to route only if
error wrongcombination is in the flowxml.
|
Example usage:
- Cancelling the form.
- Cancelling the form when a specific condition occurs.
- Go to a specific webpage.
- Go to a specific step in a form.
- When an error occurs, go to a specific webpage.
|
Method Summary |
RoutingResult |
doRouting(FormDefinition form,
State formState,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Performs routing based on the form definition and the values of the client. |
void |
init(FormComponentConfig c)
Passes the initialization parameters to the component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GoToRouter
public GoToRouter()
init
public void init(FormComponentConfig c)
throws InitializationException
- Description copied from interface:
FormComponent
- Passes the initialization parameters to the component.
- Specified by:
init in interface FormComponent
- Parameters:
c - The FormComponentConfig object that contains
configutation information for this component.
- Throws:
InitializationException - If initialization failed
doRouting
public RoutingResult doRouting(FormDefinition form,
State formState,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
- Description copied from interface:
Router
- Performs routing based on the form definition and the values of the client.
- Specified by:
doRouting in interface Router
- Parameters:
form - The definition of the current form flowformState - The object representing the state of the client filling out a form.req - The http servlet requestres - The http servlet response
- Returns:
- The routing result for the form, or
null if the router doesn't match
Copyright © 2007-2011 GX Software BV. All Rights Reserved.