|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for all common-controls actions
Method Summary | |
void |
applyControlStates(ActionContext ctx)
Applies the serialized control state from the HTTPRequest to the corresponding control instances. |
void |
cleanup(ActionContext ctx)
This method do some cleanup after the action finished. |
ActionContext |
createActionContext(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method is called to create the ActionContext wrapper. |
void |
doExecute(ActionContext ctx)
A template method which must be overridden by the subclass. |
void |
doPostExecute(ActionContext ctx)
A template method. |
boolean |
doPreExecute(ActionContext ctx)
A template method. |
void |
doRenderAjaxResponse(ActionContext ctx,
javax.servlet.jsp.PageContext pageContext)
Renders the AJAX XML response |
void |
doSetMenuContext(ActionContext ctx,
MenuContext menuCtx)
Sets the menu context. |
void |
execute(ActionContext ctx)
This method is called instead the struts execute. |
java.lang.reflect.Method |
getActionHandler(ControlActionContext ctx,
java.lang.Object[] params)
Searches the action class for a handler method. |
Control |
getControlByName(ActionContext ctx,
java.lang.String name)
The framework has a default pattern where to search a control instance. |
DialogContext |
getDialogContext(ActionContext ctx,
boolean create)
Returns or creates a dialog context |
ActionContext |
handleControlAction(ActionContext ctx,
ControlMethodInvocation cmi)
Handles an action which comes from a control on the form an delegates the request to the control. |
void |
handleControlAction(ControlActionContext ctx,
java.lang.Object[] params)
Handles an action which comes from a control on the form. |
ActionContext |
handleFormAction(ActionContext ctx)
Checks if the request comes from a form button (save, cancel, ...) and delegates the request to the corresponding handler for the button which must be implemented in the (action) subclass. |
void |
setControlValue(ActionContext ctx,
ControlValuePath path,
java.lang.String[] values)
This method is called to set a control element value |
void |
setControlValuesFromRequest(ActionContext ctx)
This method is called to updates any control element data from request values. |
Method Detail |
public void cleanup(ActionContext ctx)
ctx
- ActionContextpublic DialogContext getDialogContext(ActionContext ctx, boolean create)
ctx
- The ActionContextcreate
- Indicates if an existing context should be returned (false);
otherwise a new context is started (true)
public ActionContext createActionContext(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
mapping
- Struts Action Mappingform
- Struts Action Formrequest
- HTTPServletRequestresponse
- HTTPServletResponse
public Control getControlByName(ActionContext ctx, java.lang.String name) throws java.lang.Exception
ctx
- The ActionContextname
- The name of the bean
java.lang.Exception
- If an exception occurredpublic void applyControlStates(ActionContext ctx) throws java.lang.Exception
ctx
- ActionContext
java.lang.Exception
- if an exception occurspublic java.lang.reflect.Method getActionHandler(ControlActionContext ctx, java.lang.Object[] params)
ctx
- the action contextparams
- actual parameters
null
when no such method
is definedpublic ActionContext handleControlAction(ActionContext ctx, ControlMethodInvocation cmi) throws java.lang.Exception
ctx
- ActionContextcmi
- ControlMethodInvocation
java.lang.Exception
- if an exception occurspublic void handleControlAction(ControlActionContext ctx, java.lang.Object[] params) throws java.lang.Exception
ctx
- ControlRequestContextparams
- Parameters
java.lang.Exception
- if an exception occurspublic void setControlValue(ActionContext ctx, ControlValuePath path, java.lang.String[] values) throws java.lang.Exception
ctx
- The ActionContextpath
- The Pathname of the valuevalues
- The value itself
java.lang.Exception
- is thrown when a value could not be setpublic void setControlValuesFromRequest(ActionContext ctx) throws java.lang.Exception
ControlValuePath
ctx
- The ActionContext
java.lang.Exception
- is thrown when a value could not be setpublic ActionContext handleFormAction(ActionContext ctx) throws java.lang.Exception
ctx
- The ActionContext
java.lang.Exception
- If an exception occurredpublic void execute(ActionContext ctx) throws java.lang.Exception
ctx
- ActionContext
java.lang.Exception
- if an exception occurspublic boolean doPreExecute(ActionContext ctx) throws java.lang.Exception
ctx
- The ActionContext
java.lang.Exception
- If an exception occurredpublic void doPostExecute(ActionContext ctx) throws java.lang.Exception
ctx
- The ActionContext
java.lang.Exception
- If an exception occurredpublic void doExecute(ActionContext ctx) throws java.lang.Exception
ctx
- ActionContext
java.lang.Exception
- if an exception occurspublic void doSetMenuContext(ActionContext ctx, MenuContext menuCtx) throws java.lang.Exception
ctx
- The ActionContextmenuCtx
- The MenuContext
java.lang.Exception
- If an exception occurredpublic void doRenderAjaxResponse(ActionContext ctx, javax.servlet.jsp.PageContext pageContext) throws java.lang.Exception
ctx
- ActionContextpageContext
- PageContext
java.lang.Exception
- Indicates an error during rendering
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |