Skip to content

Commit

Permalink
Unify ActionSource and ActionSource2
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Feb 17, 2024
1 parent 77bbd9b commit 4706a43
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 52 deletions.
4 changes: 2 additions & 2 deletions spec/src/main/asciidoc/ApplicationIntegration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2195,10 +2195,10 @@ _UIViewAction_ (respectively) to be added to the view. Because
_UIViewParameter_ extends _UIInput_ it is valid to attach any of the
kinds of attached objects to an _<f:viewParameter>_ that are valid for
any element that represents any other kind of _UIInput_ in the view.
Because _UIViewAction_ implements _ActionSource2_, it is valid to
Because _UIViewAction_ implements _ActionSource_, it is valid to
attach any of the kinds of attached objects to an _<f:viewAction>_ that
are valid for any element that represents any other kind of
_ActionSource2_ in the view.
_ActionSource_ in the view.


[source,java]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ lifecycle; the standard Jakarta Faces components and framework employ them

* During _Apply Request Values_ or _Invoke
Application_ phase (depending upon the state of the _immediate_
property), components that implement the _ActionSource2_ behavioral
interface (see <<UserInterfaceComponentModel.adoc#a1120,ActionSource2>>) utilize
property), components that implement the _ActionSource_ behavioral
interface (see <<UserInterfaceComponentModel.adoc#a1090,ActionSource>>) utilize
_MethodExpressions_ as follows:

** If the _actionExpression_ property is
Expand Down Expand Up @@ -209,7 +209,7 @@ jakarta.faces.component.UIComponent, java.lang.Object);_

The _MethodBinding_ typed _action_ property
of _ActionSource_ is deprecated and has been replaced by the
_MethodExpression_ typed _actionExpression_ property of _ActionSource2_.
_MethodExpression_ typed _actionExpression_ property of _ActionSource_.

[[a2403]]
==== MethodExpression Syntax and Semantics
Expand Down
4 changes: 2 additions & 2 deletions spec/src/main/asciidoc/ExpressionLanguageFacility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ lifecycle; the standard Jakarta Faces components and framework employ them

* During _Apply Request Values_ or _Invoke
Application_ phase (depending upon the state of the _immediate_
property), components that implement the _ActionSource2_ behavioral
interface (see <<UserInterfaceComponentModel.adoc#a1120,ActionSource2>>) utilize
property), components that implement the _ActionSource_ behavioral
interface (see <<UserInterfaceComponentModel.adoc#a1090,ActionSource>>) utilize
_MethodExpressions_ as follows:

** If the _actionExpression_ property is
Expand Down
2 changes: 1 addition & 1 deletion spec/src/main/asciidoc/IntegrationWithJSP.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2961,7 +2961,7 @@ passing “converter” as the name of the _ValueExpression_ and the
_ValueExpression_ instance as the value.

* For a non-__null__ _action_ attribute on
custom actions related to _ActionSource2_ components (_commandButton_,
custom actions related to _ActionSource_ components (_commandButton_,
_commandLink_), the _setProperties()_ method of the tag handler
implementation class must pass the value of the action attribute, which
is a _MethodExpression_, to the component’s _setActionExpression()_
Expand Down
65 changes: 21 additions & 44 deletions spec/src/main/asciidoc/UserInterfaceComponentModel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,11 @@ events, including the ability invoke application actions (see
_ActionListener_ facility (see <<ApplicationIntegration.adoc#a3402,
ActionListener Property>>).

The _ActionSource_ interface also provides a JavaBeans _actionExpression_
property analogous to the _action_ property. This allows the _ActionSource_
concept to leverage the Jakarta Expression Language API.


[[a1092]]
===== Properties

Expand All @@ -935,6 +940,16 @@ indicating that the default _ActionListener_ should execute immediately
(that is, during the _Apply Request Values_ phase of the request
processing lifecycle, instead of waiting for _Invoke Application_
phase). The default value of this property must be _false_.

| _actionExpression_
|RW |
_jakarta.el.MethodExpression_ |A
_MethodExpression_ (see <<ExpressionLanguageFacility.adoc#a3039,MethodExpression>>)
that must (if non-__null__) point at an action method (see
<<ApplicationIntegration.adoc#a3553,Application Actions>>). The specified
method will be called during the _Apply Request Values_ or _Invoke
Application_ phase of the request processing lifecycle, as described in
<<RequestProcessingLifecycle.adoc#a454,Invoke Application>>.
|===


Expand Down Expand Up @@ -992,44 +1007,6 @@ _Invoke Application_ phases of the request processing lifecycle. See
<<RequestProcessingLifecycle.adoc#a454,Invoke Application>> for more
information.

[[a1120]]
==== ActionSource2

The _ActionSource2_ interface extends
_ActionSource_ and provides a JavaBeans property analogous to the
_action_ property on __ActionSource__. This allows the _ActionSource_
concept to leverage the Jakarta Expression Language API.

===== Properties

The following render-independent properties
are added by the _ActionSource_ interface:

[width="100%",cols="20%,10%,20%,50%",options="header",]
|===
|Name |Access
|Type |Description
| _actionExpression_
|RW |
_jakarta.el.MethodExpression_ |A
_MethodExpression_ (see <<ExpressionLanguageFacility.adoc#a3039,MethodExpression>>)
that must (if non-__null__) point at an action method (see
<<ApplicationIntegration.adoc#a3553,Application Actions>>). The specified
method will be called during the _Apply Request Values_ or _Invoke
Application_ phase of the request processing lifecycle, as described in
<<RequestProcessingLifecycle.adoc#a454,Invoke Application>>.
|===



===== Methods

_ActionSource2_ adds no new processing
methods.

===== Events

_ActionSource2_ adds no new events.

[[a1134]]
==== NamingContainer
Expand Down Expand Up @@ -2809,11 +2786,11 @@ directory relative to the _index.xhtml_ file.
The _<cc:interface>_ section declares
the public interface that users of this component need to understand. In
this case, the component declares that it contains an implementation of
_ActionSource2_ (see <<UserInterfaceComponentModel.adoc#a1120,ActionSource2>>),
and therefore anything one can do with an _ActionSource2_ in a Facelet
_ActionSource_ (see <<UserInterfaceComponentModel.adoc#a1090,ActionSource>>),
and therefore anything one can do with an _ActionSource_ in a Facelet
markup page you one do with the composite component. (See
<<UserInterfaceComponentModel.adoc#a1088,Component Behavioral Interfaces>> for
more on _ActionSource2_ and other behavioral interfaces). The
more on _ActionSource_ and other behavioral interfaces). The
_<cc:implementation>_ section defines the implementation of this
composite component.

Expand Down Expand Up @@ -3121,13 +3098,13 @@ For example, if the defining page has
+
The list of attached object targets would
consist of instances of implementations of the following interfaces from
the package _jakarta.faces.webapp.vdl_.
the package _jakarta.faces.view_.
+
. EditableValueHolderAttachedObjectTarget

. ActionSource2AttachedObjectTarget
. ActionSourceAttachedObjectTarget

. ActionSource2AttachedObjectTarget
. ActionSourceAttachedObjectTarget

. BehaviorHolderAttachedObjectTarget

Expand Down

0 comments on commit 4706a43

Please sign in to comment.