Class HelpTreeIndexAdaptor
- java.lang.Object
-
- com.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
-
- org.glassfish.admingui.common.help.HelpTreeIndexAdaptor
-
- All Implemented Interfaces:
com.sun.jsftemplating.component.factory.tree.TreeAdaptor
public class HelpTreeIndexAdaptor extends com.sun.jsftemplating.component.factory.tree.TreeAdaptorBaseThe
HelpTreeAdaptorimplementation must have apublic static HelpTreeAdaptor getInstance(FacesContext, LayoutComponent, UIComponent)method in order to get access to an instance of theHelpTreeAdaptorinstance.This class is used by
DynamicTreeNodeFactory.- Author:
- Ken Paulsen (ken.paulsen@sun.com)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHelpTreeIndexAdaptor(com.sun.jsftemplating.layout.descriptors.LayoutComponent desc, jakarta.faces.component.UIComponent parent)This constructor saves theLayoutComponentdescriptor and theUIComponentassociated with thisTreeAdaptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ListgetChildTreeNodeObjects(Object nodeObject)Returns childIndexItems for the givenIndexItemorIndexmodel Object.Map<String,jakarta.faces.component.UIComponent>getFacets(jakarta.faces.component.UIComponent comp, Object nodeObject)This method returns any facets that should be applied to theTreeNode (comp).StringgetFactoryClass(Object nodeObject)This method returns theUIComponentfactory class implementation that should be used to create aTreeNodefor the given tree node model object.Map<String,Object>getFactoryOptions(Object nodeObject)This method returns the "options" that should be supplied to the factory that creates theTreeNodefor the given tree node model object.MapgetHandlersByType(jakarta.faces.component.UIComponent comp, Object nodeObject)Advanced framework feature which provides better handling for things such as expanding TreeNodes, beforeEncode, and other events.StringgetId(Object nodeObject)This method returns theidfor the given tree node model object.static com.sun.jsftemplating.component.factory.tree.TreeAdaptorgetInstance(jakarta.faces.context.FacesContext ctx, com.sun.jsftemplating.layout.descriptors.LayoutComponent desc, jakarta.faces.component.UIComponent parent)This method provides access to anHelpTreeAdaptorinstance.voidinit()This method is called shortly aftergetInstance(FacesContext, LayoutComponent, UIComponent).
-
-
-
Constructor Detail
-
HelpTreeIndexAdaptor
protected HelpTreeIndexAdaptor(com.sun.jsftemplating.layout.descriptors.LayoutComponent desc, jakarta.faces.component.UIComponent parent)This constructor saves the
LayoutComponentdescriptor and theUIComponentassociated with thisTreeAdaptor. This constructor is used by the getInstance() method.
-
-
Method Detail
-
getInstance
public static com.sun.jsftemplating.component.factory.tree.TreeAdaptor getInstance(jakarta.faces.context.FacesContext ctx, com.sun.jsftemplating.layout.descriptors.LayoutComponent desc, jakarta.faces.component.UIComponent parent)This method provides access to an
HelpTreeAdaptorinstance. Each time it is invoked, it returns a new instance.
-
init
public void init()
This method is called shortly after
getInstance(FacesContext, LayoutComponent, UIComponent). It provides a place for post-creation initialization to take occur.- Specified by:
initin interfacecom.sun.jsftemplating.component.factory.tree.TreeAdaptor- Overrides:
initin classcom.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
-
getChildTreeNodeObjects
public List getChildTreeNodeObjects(Object nodeObject)
Returns child
IndexItems for the givenIndexItemorIndexmodel Object. Ifnullis supplied,nullis returned any otherObjecttype will result in anIllegalArgumentException.
-
getFactoryOptions
public Map<String,Object> getFactoryOptions(Object nodeObject)
This method returns the "options" that should be supplied to the factory that creates the
TreeNodefor the given tree node model object.Some useful options for the standard
TreeNodecomponent include:- text
- url
- imageURL
- target
- action
- actionListener
- expanded
See Tree / TreeNode component documentation for more details.
-
getId
public String getId(Object nodeObject)
This method returns the
idfor the given tree node model object.
-
getFacets
public Map<String,jakarta.faces.component.UIComponent> getFacets(jakarta.faces.component.UIComponent comp, Object nodeObject)
This method returns any facets that should be applied to the
TreeNode (comp). Useful facets for the sunTreeNodecomponent are: "content" and "image".Facets that already exist on
comp, or facets that are directly added tocompdo not need to be returned from this method.This implementation directly adds a "content" and "image" facet and returns
nullfrom this method.- Parameters:
comp- The tree nodeUIComponent.nodeObject- The (model) object representing the tree node.
-
getHandlersByType
public Map getHandlersByType(jakarta.faces.component.UIComponent comp, Object nodeObject)
Advanced framework feature which provides better handling for things such as expanding TreeNodes, beforeEncode, and other events.
This method should return a
MapofListofHandlerobjects. EachListin theMapshould be registered under a key that cooresponds to to the "event" in which theHandlers should be invoked.- Specified by:
getHandlersByTypein interfacecom.sun.jsftemplating.component.factory.tree.TreeAdaptor- Overrides:
getHandlersByTypein classcom.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
-
getFactoryClass
public String getFactoryClass(Object nodeObject)
This method returns the
UIComponentfactory class implementation that should be used to create aTreeNodefor the given tree node model object.This implementation returns the default return value, unless the
nodeObjectrepresents the root node. In that case it will return a the TreeFactory factory class:com.sun.jsftemplating.component.factory.sun.TreeFactory
- Specified by:
getFactoryClassin interfacecom.sun.jsftemplating.component.factory.tree.TreeAdaptor- Overrides:
getFactoryClassin classcom.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
-
-