Package com.jk.web.util
Class UIFacesVisitor
java.lang.Object
com.jk.web.util.UIFacesVisitor
- All Implemented Interfaces:
jakarta.faces.component.visit.VisitCallback
This class is a visitor class for traversing a Jakarta Server Faces (JSF)
component tree and collecting specific types of components.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.primefaces.component.column.Column>
This method retrieves the collected list of Column components.List<jakarta.faces.component.UICommand>
This method retrieves the collected list of UICommand components.List<jakarta.faces.component.UIForm>
getForms()
This method retrieves the collected list of UIForm components.List<jakarta.faces.component.UIInput>
This method retrieves the collected list of UIInput components.List<jakarta.faces.component.UIOutput>
This method retrieves the collected list of UIOutput components.List<org.primefaces.component.panelgrid.PanelGrid>
This method retrieves the collected list of PanelGrid components.List<jakarta.faces.component.UISelectItems>
This method retrieves the list of UISelectItems components.List<org.primefaces.component.submenu.UISubmenu>
This method retrieves the collected list of UISubmenu components.List<org.primefaces.component.datatable.DataTable>
This method retrieves the collected list of DataTable components.void
setPanelGrids
(List<org.primefaces.component.panelgrid.PanelGrid> panelGrids) This method sets the collected list of PanelGrid components to the provided value.jakarta.faces.component.visit.VisitResult
visit
(jakarta.faces.component.visit.VisitContext context, jakarta.faces.component.UIComponent target) This method is called during component tree visits byVisitContext.invokeVisitCallback()
to visit the specified component.
-
Constructor Details
-
UIFacesVisitor
public UIFacesVisitor()
-
-
Method Details
-
getColumns
This method retrieves the collected list of Column components.- Returns:
- the collected list of Column components.
-
getCommands
This method retrieves the collected list of UICommand components.- Returns:
- the collected list of UICommand components.
-
getForms
This method retrieves the collected list of UIForm components.- Returns:
- the collected list of UIForm components.
-
getInputs
This method retrieves the collected list of UIInput components.- Returns:
- the collected list of UIInput components.
-
getOutputs
This method retrieves the collected list of UIOutput components.- Returns:
- the collected list of UIOutput components.
-
getPanelGrids
This method retrieves the collected list of PanelGrid components.- Returns:
- the collected list of PanelGrid components.
-
getSelectItems
This method retrieves the list of UISelectItems components.- Returns:
- the list of UISelectItems components.
-
getSubMenus
This method retrieves the collected list of UISubmenu components.- Returns:
- the collected list of UISubmenu components
-
getTables
This method retrieves the collected list of DataTable components.- Returns:
- the collected list of DataTable components.
-
setPanelGrids
This method sets the collected list of PanelGrid components to the provided value.- Parameters:
panelGrids
- Specifies the new collected list of PanelGrid components.
-
visit
public jakarta.faces.component.visit.VisitResult visit(jakarta.faces.component.visit.VisitContext context, jakarta.faces.component.UIComponent target) This method is called during component tree visits byVisitContext.invokeVisitCallback()
to visit the specified component. At the point in time when this method is called, the argumenttarget
is guaranteed to be in the proper state with respect to its ancestors in the View.- Specified by:
visit
in interfacejakarta.faces.component.visit.VisitCallback
- Parameters:
context
- theVisitContext
for this tree visit.target
- theUIComponent
to visit- Returns:
- a
VisitResult
that indicates whether to continue visiting the component's subtree, skip visiting the component's subtree or end the visit.
-