Class AbstractUIData

  • All Implemented Interfaces:
    EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, Visual
    Direct Known Subclasses:
    AbstractUISheet, AbstractUITree

    public abstract class AbstractUIData
    extends javax.faces.component.UIData
    implements Visual
    Base class for sheet and tree.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String SUFFIX_EXPANDED  
      static String SUFFIX_MARKED
      Deprecated.
      since 2.0.0.
      static String SUFFIX_SELECTED  
      • Fields inherited from class javax.faces.component.UIData

        COMPONENT_FAMILY, COMPONENT_TYPE
      • Fields inherited from class javax.faces.component.UIComponent

        ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
      • Fields inherited from interface javax.faces.component.NamingContainer

        SEPARATOR_CHAR
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractUIData()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void createTreeDataModel​(Object value, boolean showRoot)
      Creates the TreeDataModel which should be used.
      void encodeBegin​(javax.faces.context.FacesContext context)  
      javax.faces.component.UIComponent findComponent​(String searchId)  
      protected javax.faces.model.DataModel getDataModel()  
      abstract ExpandedState getExpandedState()  
      TreePath getPath()  
      String getRowClientId()  
      List<Integer> getRowIndicesOfChildren()  
      String getRowParentClientId()  
      abstract Selectable getSelectable()  
      Selectable getSelectableAsEnum()
      Deprecated.
      since 3.0.0, please use getSelectable()
      abstract SelectedState getSelectedState()  
      TreeDataModel getTreeDataModel()  
      boolean invokeOnComponent​(javax.faces.context.FacesContext facesContext, String clientId, javax.faces.component.ContextCallback callback)  
      boolean isFolder()  
      boolean isRendersRowContainer()
      The value describes, if the UIData renderer creates container elements to hold the row information.
      boolean isRowsUnlimited()  
      boolean isRowVisible()  
      abstract boolean isShowRoot()  
      boolean isShowRootJunction()  
      boolean isTreeModel()  
      String stripRowIndex​(String initialSearchId)  
      boolean visitTree​(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)
      This is, because we need to visit the UIRow for each row, which is not done in the base implementation.
      • Methods inherited from class javax.faces.component.UIData

        broadcast, createUniqueId, encodeEnd, getContainerClientId, getFamily, getFirst, getFooter, getHeader, getRowCount, getRowData, getRowIndex, getRows, getValue, getVar, isRowAvailable, isRowStatePreserved, markInitialState, processDecodes, processUpdates, processValidators, queueEvent, restoreState, saveState, setDataModel, setFirst, setFooter, setHeader, setRowIndex, setRows, setRowStatePreserved, setValue, setValueBinding, setValueExpression, setVar
      • Methods inherited from class javax.faces.component.UIComponentBase

        addClientBehavior, addFacesListener, clearInitialState, decode, encodeAll, encodeChildren, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
      • Methods inherited from class javax.faces.component.UIComponent

        getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, subscribeToEvent, unsubscribeFromEvent
    • Constructor Detail

      • AbstractUIData

        public AbstractUIData()
    • Method Detail

      • isTreeModel

        public boolean isTreeModel()
      • getDataModel

        protected javax.faces.model.DataModel getDataModel()
        Overrides:
        getDataModel in class javax.faces.component.UIData
      • getSelectable

        public abstract Selectable getSelectable()
      • createTreeDataModel

        protected void createTreeDataModel​(Object value,
                                           boolean showRoot)
        Creates the TreeDataModel which should be used. Override this method to use a custom model for an unsupported tree model. (Currently Tobago supports TreeNode out of the box.
        Parameters:
        value - The reference to the data model (comes from the value attribute of the UIData)
        showRoot - comes from the showRoot attribute.
      • encodeBegin

        public void encodeBegin​(javax.faces.context.FacesContext context)
                         throws IOException
        Overrides:
        encodeBegin in class javax.faces.component.UIData
        Throws:
        IOException
      • getExpandedState

        public abstract ExpandedState getExpandedState()
      • getSelectedState

        public abstract SelectedState getSelectedState()
      • isRowVisible

        public boolean isRowVisible()
      • getRowClientId

        public String getRowClientId()
      • getRowParentClientId

        public String getRowParentClientId()
      • isShowRoot

        public abstract boolean isShowRoot()
      • isShowRootJunction

        public boolean isShowRootJunction()
      • isRowsUnlimited

        public boolean isRowsUnlimited()
        Returns:
        Is the (maximum) number of rows to display set to zero?
      • isRendersRowContainer

        public boolean isRendersRowContainer()
        The value describes, if the UIData renderer creates container elements to hold the row information. This information is important for the TreeNodeRenderer to set the visible state in the output or not. Typically the Sheet returns true and a Tree returns false, because the sheet renders the HTML TR tags, the the sheet also is responsible for the visible state.
      • findComponent

        public javax.faces.component.UIComponent findComponent​(String searchId)
        Overrides:
        findComponent in class javax.faces.component.UIComponentBase
      • stripRowIndex

        public String stripRowIndex​(String initialSearchId)
      • invokeOnComponent

        public boolean invokeOnComponent​(javax.faces.context.FacesContext facesContext,
                                         String clientId,
                                         javax.faces.component.ContextCallback callback)
                                  throws javax.faces.FacesException
        Overrides:
        invokeOnComponent in class javax.faces.component.UIData
        Throws:
        javax.faces.FacesException
      • getPath

        public TreePath getPath()
        Returns:
        The TreePath of the current row index.
      • isFolder

        public boolean isFolder()
        Returns:
        Is the current row index representing a folder.
      • getRowIndicesOfChildren

        public List<Integer> getRowIndicesOfChildren()
      • visitTree

        public boolean visitTree​(javax.faces.component.visit.VisitContext context,
                                 javax.faces.component.visit.VisitCallback callback)
        This is, because we need to visit the UIRow for each row, which is not done in the base implementation.
        Overrides:
        visitTree in class javax.faces.component.UIData