Package org.springframework.faces.model
Class SelectionTrackingActionListener
java.lang.Object
org.springframework.faces.model.SelectionTrackingActionListener
- All Implemented Interfaces:
jakarta.faces.event.ActionListener
,jakarta.faces.event.FacesListener
,EventListener
public class SelectionTrackingActionListener
extends Object
implements jakarta.faces.event.ActionListener
Custom
ActionListener
that inspects the UIComponent
that signaled the current ActionEvent
to
determine whether it is a child of any iterator type of component (such as UIData
) that uses a
SelectionAware
data model implementation. If a containing SelectionAware model is found, the row containing
the event-signaling component instance will be selected. This enables convenient access to the selected model state
at any time through EL expressions such as #{model.selectedRow.id} without having to rely on the whether or not the
current row index is pointing to the desired row as it would need to be to use an expression such as
#{model.rowData.id}- Author:
- Jeremy Grelle
-
Field Summary
Fields inherited from interface jakarta.faces.event.ActionListener
TO_FLOW_DOCUMENT_ID_ATTR_NAME
-
Constructor Summary
ConstructorDescriptionSelectionTrackingActionListener
(jakarta.faces.event.ActionListener delegate) -
Method Summary
-
Constructor Details
-
SelectionTrackingActionListener
public SelectionTrackingActionListener(jakarta.faces.event.ActionListener delegate)
-
-
Method Details
-
processAction
public void processAction(jakarta.faces.event.ActionEvent event) throws jakarta.faces.event.AbortProcessingException - Specified by:
processAction
in interfacejakarta.faces.event.ActionListener
- Throws:
jakarta.faces.event.AbortProcessingException
-