|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.infohazard.maverick.ctl.FormBeanUser
FormBeanUser is a base class for singleton controllers which use external FormBeans rather than populating themselves. Since only one of these will exist for each command definition, it must be thread-safe. This Controller pattern is very similar to Struts Actions.
Field Summary | |
static java.lang.String |
ERROR
Common name for the typical "error" view. |
static java.lang.String |
SUCCESS
Common name for the typical "success" view. |
Constructor Summary | |
FormBeanUser()
|
Method Summary | |
java.lang.String |
go(ControllerContext cctx)
Executes this controller. |
void |
init(org.jdom.Element controllerNode)
If you want any custom behavior based on the content of the configuration file, this will be called once before the FormBeanUser is ever used. |
protected abstract java.lang.Object |
makeFormBean(ControllerContext cctx)
This method will be called to produce a simple bean whose properties will be populated with the http request parameters. |
protected java.lang.String |
perform(java.lang.Object formBean,
ControllerContext cctx)
This method can be overriden to perform application logic. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SUCCESS
public static final java.lang.String ERROR
Constructor Detail |
public FormBeanUser()
Method Detail |
public void init(org.jdom.Element controllerNode) throws ConfigException
init
in interface ControllerSingleton
ConfigException
public final java.lang.String go(ControllerContext cctx) throws javax.servlet.ServletException
go
in interface Controller
javax.servlet.ServletException
ControllerSingleton#perform
protected java.lang.String perform(java.lang.Object formBean, ControllerContext cctx) throws java.lang.Exception
formBean
- will be a bean created by makeFormBean(),
which has been populated with the http request parameters.
java.lang.Exception
protected abstract java.lang.Object makeFormBean(ControllerContext cctx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |