|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.chain.commands.ActionCommandBase org.apache.struts.chain.commands.AbstractPopulateActionForm
public abstract class AbstractPopulateActionForm
Populate the form bean (if any) for this request.
Field Summary |
---|
Fields inherited from interface org.apache.commons.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
AbstractPopulateActionForm()
|
Method Summary | |
---|---|
boolean |
execute(ActionContext actionCtx)
Populate the form bean (if any) for this request. |
protected void |
handleCancel(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Take into account whether the request includes any defined value for the global "cancel" parameter. |
protected abstract void |
populate(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Populate the given ActionForm with request parameter
values, taking into account any prefix/suffix values configured on the
given ActionConfig . |
protected abstract void |
reset(ActionContext context,
ActionConfig actionConfig,
ActionForm actionForm)
Call the reset() method on the specified form
bean. |
protected java.lang.String |
trimParameterName(ActionConfig actionConfig,
java.lang.String name)
For a given request parameter name, trim off any prefix and/or suffix which are defined in actionConfig and return what
remains. |
Methods inherited from class org.apache.struts.chain.commands.ActionCommandBase |
---|
execute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPopulateActionForm()
Method Detail |
---|
public boolean execute(ActionContext actionCtx) throws java.lang.Exception
Populate the form bean (if any) for this request.
execute
in interface ActionCommand
execute
in class ActionCommandBase
actionCtx
- The Context
for the current request
false
so that processing continues
java.lang.Exception
- On an unexpected errorprotected abstract void reset(ActionContext context, ActionConfig actionConfig, ActionForm actionForm)
Call the reset()
method on the specified form
bean.
context
- The context for this requestactionConfig
- The actionConfig for this requestactionForm
- The form bean for this requestprotected abstract void populate(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) throws java.lang.Exception
Populate the given ActionForm
with request parameter
values, taking into account any prefix/suffix values configured on the
given ActionConfig
.
context
- The ActionContext we are processingactionConfig
- The ActionConfig we are processingactionForm
- The ActionForm we are processing
java.lang.Exception
- On an unexpected errorprotected java.lang.String trimParameterName(ActionConfig actionConfig, java.lang.String name)
For a given request parameter name, trim off any prefix and/or
suffix which are defined in actionConfig
and return what
remains. If either prefix or suffix is defined, then return null for
name
values which do not begin or end accordingly.
actionConfig
- The ActionConfig we are processingname
- The request parameter name to proceess
protected void handleCancel(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) throws java.lang.Exception
Take into account whether the request includes any defined value for the global "cancel" parameter.
An issue was raised (but I don't think a Bugzilla ticket created) about the security implications of using a well-known cancel property which skips form validation, as you may not write your actions to deal with the cancellation case.
context
- The ActionContext we are processingactionConfig
- The ActionConfig we are processingactionForm
- The ActionForm we are processing
java.lang.Exception
- On an unexpected errorGlobals.CANCEL_PROPERTY
,
Globals.CANCEL_PROPERTY_X
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |