Interface ActionSource2
- All Superinterfaces:
ActionSource
- All Known Implementing Classes:
HtmlCommandButton
,HtmlCommandLink
,HtmlCommandScript
,UICommand
,UIViewAction
ActionSource2 extends ActionSource
and
provides a JavaBeans property analogous to the "action
"
property on ActionSource
. The difference is the type of
this property is a MethodExpression
rather than a
MethodBinding
. This allows the
ActionSource
concept to leverage the new Unified EL
API.
- Since:
- 1.2
-
Method Summary
Modifier and TypeMethodDescriptionReturn theMethodExpression
pointing at the application action to be invoked, if thisUIComponent
is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediate
property.void
setActionExpression
(MethodExpression action) Set theMethodExpression
pointing at the appication action to be invoked, if thisUIComponent
is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediate
property.Methods inherited from interface javax.faces.component.ActionSource
addActionListener, getAction, getActionListener, getActionListeners, isImmediate, removeActionListener, setAction, setActionListener, setImmediate
-
Method Details
-
getActionExpression
MethodExpression getActionExpression()Return the
MethodExpression
pointing at the application action to be invoked, if thisUIComponent
is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediate
property.Note that it's possible that the returned
MethodExpression
is just a wrapper around aMethodBinding
instance whith was set by a call toActionSource.setAction(javax.faces.el.MethodBinding)
. This makes it possible for the defaultActionListener
to continue to work properly with older components.- Returns:
- the action expression.
-
setActionExpression
Set the
MethodExpression
pointing at the appication action to be invoked, if thisUIComponent
is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediate
property.Any method referenced by such an expression must be public, with a return type of
String
, and accept no parameters.- Parameters:
action
- The new method expression
-