public class ListTreeAdaptor
extends com.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
The ListTreeAdaptor
implementation must have a
public static ListTreeAdaptor getInstance(FacesContext,
LayoutComponent, UIComponent)
method in order to get access to
an instance of the ListTreeAdaptor
instance.
This class is used by DynamicTreeNodeFactory
.
Valid options for this implementation:
Modifier | Constructor and Description |
---|---|
protected |
ListTreeAdaptor(com.sun.jsftemplating.layout.descriptors.LayoutComponent desc,
javax.faces.component.UIComponent parent)
This constructor saves the
LayoutComponent descriptor
and the UIComponent associated with this
TreeAdaptor . |
Modifier and Type | Method and Description |
---|---|
List |
getChildTreeNodeObjects(Object nodeObject)
Returns child
TreeNode s for the given
TreeNode model Object. |
Map<String,javax.faces.component.UIComponent> |
getFacets(javax.faces.component.UIComponent comp,
Object nodeObject)
This method returns any facets that should be applied to the
TreeNode (comp) . |
Map<String,Object> |
getFactoryOptions(Object nodeObject)
This method returns the "options" that should be supplied to the
factory that creates the
TreeNode for the given tree
node model object. |
Map |
getHandlersByType(javax.faces.component.UIComponent comp,
Object nodeObject)
Advanced framework feature which provides better handling for
things such as expanding TreeNodes, beforeEncode, and other
events.
|
String |
getId(Object nodeObject)
This method returns the
id for the given tree node
model object. |
static com.sun.jsftemplating.component.factory.tree.TreeAdaptor |
getInstance(javax.faces.context.FacesContext ctx,
com.sun.jsftemplating.layout.descriptors.LayoutComponent desc,
javax.faces.component.UIComponent parent)
This method provides access to an
ListTreeAdaptor
instance. |
void |
init()
This method is called shortly after
getInstance(FacesContext, LayoutComponent, UIComponent) . |
protected ListTreeAdaptor(com.sun.jsftemplating.layout.descriptors.LayoutComponent desc, javax.faces.component.UIComponent parent)
This constructor saves the LayoutComponent
descriptor
and the UIComponent
associated with this
TreeAdaptor
. This constructor is used by the
getInstance() method.
public static com.sun.jsftemplating.component.factory.tree.TreeAdaptor getInstance(javax.faces.context.FacesContext ctx, com.sun.jsftemplating.layout.descriptors.LayoutComponent desc, javax.faces.component.UIComponent parent)
This method provides access to an ListTreeAdaptor
instance. Each time it is invoked, it returns a new instance.
public void init()
This method is called shortly after
getInstance(FacesContext, LayoutComponent, UIComponent)
.
It provides a place for post-creation initialization to take
occur.
init
in interface com.sun.jsftemplating.component.factory.tree.TreeAdaptor
init
in class com.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
public List getChildTreeNodeObjects(Object nodeObject)
Returns child TreeNode
s for the given
TreeNode
model Object.
public Map<String,Object> getFactoryOptions(Object nodeObject)
This method returns the "options" that should be supplied to the
factory that creates the TreeNode
for the given tree
node model object.
Some useful options for the standard TreeNode
component include:
See Tree / TreeNode component documentation for more details.
public String getId(Object nodeObject)
This method returns the id
for the given tree node
model object.
public Map<String,javax.faces.component.UIComponent> getFacets(javax.faces.component.UIComponent comp, Object nodeObject)
This method returns any facets that should be applied to the
TreeNode (comp)
. Useful facets for the sun
TreeNode
component are: "content" and "image".
Facets that already exist on comp
, or facets that
are directly added to comp
do not need to be returned
from this method.
This implementation directly adds a "content" and "image" facet and
returns null
from this method.
comp
- The tree node UIComponent
.nodeObject
- The (model) object representing the tree node.public Map getHandlersByType(javax.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 Map
of List
of Handler
objects. Each List
in the
Map
should be registered under a key that cooresponds
to to the "event" in which the Handler
s should be
invoked.
getHandlersByType
in interface com.sun.jsftemplating.component.factory.tree.TreeAdaptor
getHandlersByType
in class com.sun.jsftemplating.component.factory.tree.TreeAdaptorBase
Copyright © 2019. All rights reserved.