|
||||||||||
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
public abstract class Action
This class represents the controller part of the MVC pattern. Extend this class to provide a specific set of operations to be performed in response of a user selection.
Action
Field Summary | |
---|---|
static org.apache.struts.action.ActionForward |
DEFAULT_FORWARD
Identifies the default resource the request will be forwarded. |
protected org.apache.commons.logging.Log |
logger
Provides logging capabilities to the action. |
Fields inherited from class org.apache.struts.action.Action |
---|
servlet |
Constructor Summary | |
---|---|
Action()
|
Method Summary | |
---|---|
protected void |
addError(org.apache.struts.action.ActionMessage message,
javax.servlet.http.HttpServletRequest request)
TODO documentation |
protected void |
addError(java.lang.String property,
org.apache.struts.action.ActionMessage message,
javax.servlet.http.HttpServletRequest request)
TODO documentation |
protected org.apache.struts.action.ActionForward |
cancel(org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionMapping mapping)
Describes the operations sequence to be performed upon cancellation of a form or wizard returning the mapping to redirect to. |
protected abstract 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. |
org.apache.struts.action.ActionForward |
execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method performs some common operations then redirects control to the abstract execute . |
protected java.util.Properties |
getProperties()
TODO documentation |
protected java.lang.String |
getRealPath(java.lang.String path)
TODO documentation |
protected javax.servlet.ServletContext |
getServletContext()
TODO documentation |
protected boolean |
hasErrors(javax.servlet.http.HttpServletRequest request)
TODO documentation |
boolean |
isChecked(java.lang.String name,
javax.servlet.http.HttpServletRequest request)
TODO documentation |
protected void |
populate(org.apache.struts.action.ActionForm form,
java.lang.Object bean,
java.util.Locale locale)
Populates, or prevalorizes, an html form with the values of a bean instance . |
void |
reset(org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping)
Ensures the specified html form has all its fields resetted to their initial value. |
protected void |
valorize(org.apache.struts.action.ActionForm form,
java.lang.Object bean,
java.util.Locale locale)
Valorizes a bean instance with the values providen with
the user submitted html form. |
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 org.apache.struts.action.ActionForward DEFAULT_FORWARD
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public Action()
Method Detail |
---|
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
execute
.
execute
in class org.apache.struts.action.Action
java.lang.Exception
Action.execute(org.apache.struts.action.ActionMapping,
org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
protected abstract 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
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.protected org.apache.struts.action.ActionForward cancel(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
input
path.
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.protected void valorize(org.apache.struts.action.ActionForm form, java.lang.Object bean, java.util.Locale locale) throws ActionException
bean
instance with the values providen with
the user submitted html form. This method uses an improved version of the
introspection paradigm to discover properties bindings.
form
- the user submitted html form containing the values to be
read.bean
- the bean instance to be valorized.locale
- the user locale for values parsing.
ActionException
- if the valorization fails, usually due to
inconsistencies between the bean and the submitted form.protected void populate(org.apache.struts.action.ActionForm form, java.lang.Object bean, java.util.Locale locale) throws ActionException
bean
instance . This method uses an improved version of
the introspection paradigm to discover properties bindings.
form
- the form to be populated.bean
- the bean instance containing the values to be written in the
form.locale
- the user locale for values parsing.
ActionException
- if the valorization fails, usually due to
inconsistencies between the bean and the submitted form.public void reset(org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMapping mapping)
form
- the form to be cleaned up.request
- the user request.mapping
- the system control mapping.protected boolean hasErrors(javax.servlet.http.HttpServletRequest request)
request
-
protected void addError(org.apache.struts.action.ActionMessage message, javax.servlet.http.HttpServletRequest request)
message
- request
- protected void addError(java.lang.String property, org.apache.struts.action.ActionMessage message, javax.servlet.http.HttpServletRequest request)
property
- message
- request
- public boolean isChecked(java.lang.String name, javax.servlet.http.HttpServletRequest request)
name
- request
-
protected javax.servlet.ServletContext getServletContext()
protected java.lang.String getRealPath(java.lang.String path)
path
-
protected java.util.Properties getProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |