public class CallableAction extends Object
CallableAction
is responsible for preparing and performing an Action
, based on a given
ActionRef
which is part of a PageDefinition
's SectionelementDef
.Constructor and Description |
---|
CallableAction(Site site,
Application application,
ApplicationRequest applicationRequest,
ActionRef actionRef)
Creates a new
CallableAction and also determines the return values for
doInclude()
doExecute()
getOnSuccess()
, based on Permissions and Condition s. |
Modifier and Type | Method and Description |
---|---|
boolean |
doExecute()
Checks whether or not this
CallableAction should execute the ActionProvider provided by the
referenced Action . |
boolean |
doForward()
Checks whether this
CallableAction causes a page-forward, which is the case when hasErrors()
returns false and getOnSuccess() a non-null value |
boolean |
doInclude()
Checks whether or not to include this
CallableAction on the PageReference . |
Action |
getAction() |
protected Object |
getBindObject(FieldProcessor fieldProcessor)
Creates, fills and returns a new bindobject.
|
String |
getOnSuccess()
Returns the forward-path that was defined by the
ActionRef this CallableAction was build from. |
boolean |
hasErrors()
Checks whether some errors occurred while performing the
Action . |
FieldProcessor |
perform()
Performs this
CallableAction .If the Action is actually included and/or executed depends on the returns values of doInclude()
and doExecute() . |
String |
toString() |
public CallableAction(Site site, Application application, ApplicationRequest applicationRequest, ActionRef actionRef) throws ProcessingException
CallableAction
and also determines the return values for
, based on Permissions
and Condition
s.site
- the current Site
application
- the current Application
applicationRequest
- the current ApplicationRequest
actionRef
- the ActionRef
as given in the SectionelementDef
of a PageDefinition
.ProcessingException
- if an error occurs while assembling the CallableAction
public Action getAction()
public FieldProcessor perform() throws ProcessingException
CallableAction
.Action
is actually included and/or executed depends on the returns values of doInclude()
and doExecute()
. If the Action
is executed and a forward-path exists, a redirect is send via
Site.sendRedirect(Environment, String)
.FieldProcessor
, only non-null
if the Action
has been executed successfullyProcessingException
- if an error occurred while performingdoInclude()
,
doExecute()
,
doForward()
,
getOnSuccess()
protected Object getBindObject(FieldProcessor fieldProcessor) throws BusinessException
fieldProcessor
- the FieldProcessor
to useBusinessException
- if
ApplicationRequest.getBindObject(FieldProcessor, org.appng.forms.RequestContainer, ClassLoader)
throws such an exceptionApplicationRequest.getBindObject(FieldProcessor, org.appng.forms.RequestContainer, ClassLoader)
public boolean doInclude()
CallableAction
on the PageReference
.true
if this CallableAction
should be included, false
otherwisepublic boolean doExecute()
CallableAction
should execute the ActionProvider
provided by the
referenced Action
.true
if this CallableAction
should be executed, false
otherwisepublic boolean hasErrors()
Action
.true
if some errors occurred, false
otherwisepublic String getOnSuccess()
ActionRef
this CallableAction
was build from.null
public boolean doForward()
CallableAction
causes a page-forward, which is the case when hasErrors()
returns false
and getOnSuccess()
a non-null
valuetrue
if a page-forward is caused, false
otherwiseCopyright © 2011–2017 aiticon GmbH. All rights reserved.