|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.action.Action net.smartlab.web.Action net.smartlab.web.DynaAction
public abstract class DynaAction
This class represent the dynamic version of the basic Action class allowing
a single class to define multiple actions.
Each declared method respecting the PARAMETERS
signature and
returning a String
or an ActionMapping
will be
available as an action mapping in Struts.
As an example both the following methods can be used in the struts
configuration file as valid mappings.
org.apache.struts.actions.LookupDispatchAction
but to distinguish
between direct method naming and reverse lookup naming you have to prefix
the reverse lookup mapping parameter with @
(at) character.
Field Summary | |
---|---|
static java.lang.Class[] |
PARAMETERS
Standard dynamic method parameters. |
Fields inherited from class net.smartlab.web.Action |
---|
DEFAULT_FORWARD, logger |
Fields inherited from class org.apache.struts.action.Action |
---|
servlet |
Constructor Summary | |
---|---|
DynaAction()
Default constructor. |
Method Summary | |
---|---|
protected org.apache.struts.action.ActionForward |
execute(org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionMapping mapping)
Implement this method to provide a custom response to a user input. |
java.lang.String |
forward(org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionMapping mapping)
Default method action used to simply forward requests to the resource mapped as success . |
Methods inherited from class net.smartlab.web.Action |
---|
addError, addError, cancel, execute, getProperties, getRealPath, getServletContext, hasErrors, isChecked, populate, reset, valorize |
Methods inherited from class org.apache.struts.action.Action |
---|
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet |
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.Class[] PARAMETERS
Constructor Detail |
---|
public DynaAction()
Method Detail |
---|
protected org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping) throws java.lang.Exception
Action
execute
in class Action
form
- the html form submitted with this request.request
- the user request.response
- the representation of the response channel.mapping
- the system control mapping.
java.lang.Exception
- if something unexpected happend during the request
execution.Action.execute(org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, ActionMapping)
public final java.lang.String forward(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping)
success
.
success
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |