com.infragistics.faces.tree.component.html
Class HtmlTreeView

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended bycom.infragistics.faces.shared.component.DataRepeater
              extended bycom.infragistics.faces.shared.component.DataList
                  extended bycom.infragistics.faces.tree.component.TreeView
                      extended bycom.infragistics.faces.tree.component.html.HtmlTreeView
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class HtmlTreeView
extends TreeView

TreeView is a component for developing user interfaces representing hierarchical data. It can contain an unlimited number of TreeNode.

Data on Demand - Client-side Partial Refresh
TreeView incorporates our technologies "DataOnDemand for JSF" and "Client-side Partial Refresh".
These unique innovations provide an unprecedented level of user-interaction and richness, only available in traditional rich-client applications.
Tree nodes, for instance, can be populated on an as needed basis, considerably decreasing traffic over the wire and increasing the overall application performance.

Bound and unbound mode
TreeView and tree nodes support bound and unbound mode. In unbound mode, tree nodes are either created declaratively (in a JSP page) or added programmatically.
In bound mode (whenever the dataModel property points to a valid data model of a backing bean) tree nodes are automatically created by TreeView, one node for each row of the data model.

Icons
TreeView fully supports icons. For instance, an icon can be displayed next to a tree node by calling TreeView.setIconUrl(java.lang.String) and TreeView.setExpandedIconUrl(java.lang.String).
Also, an icon (+/-) is automatically displayed to indicate that a node can be expanded or collapsed.

Customizable Look and Feel
Background, color, border, font attributes and much more can be customized and applied to the whole tree or specific tree nodes.

The table below summarizes which elements can be customized:

Style applied to How to customize it ?
TreeView Using setStyle(String) and/or setStyleClass(String).
Nodes Using setNodeStyleClass(String).
Hovered Nodes Using setNodeHoverStyleClass(String).
Selected Nodes Using setNodeSelectedStyleClass(String).


Theme
TreeView supports the following Themes:

Facets

The following facets can be nested inside the component:
Facet Name Description
bottomPager Specifies the bottom pager to use
topPager Specifies the top pager to use

Events


TreeView fires the following events:


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String RENDERER_TYPE
           
 
Fields inherited from class com.infragistics.faces.tree.component.TreeView
FACET_BOTTOM_PAGER, FACET_TOP_PAGER
 
Fields inherited from class com.infragistics.faces.shared.component.DataRepeater
DATA_ROW
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
HtmlTreeView()
           
 
Method Summary
 java.lang.String getFamily()
           
 java.lang.String getNodeHoverStyleClass()
          Returns the name of the css class applied to a tree node when the mouse cursor is over it This value can also be specified on a node basis
 java.lang.String getNodeSelectedStyleClass()
          Returns the name of the css class applied to selected tree nodes This value can also be specified on a node basis
 java.lang.String getNodeStyleClass()
          Returns the name of the css class applied to tree nodes This value can also be specified on a node basis
 java.lang.String getStyle()
          Returns the default Style applied to the component
 java.lang.String getStyleClass()
          Returns the name of the css class applied to the component
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setNodeHoverStyleClass(java.lang.String cssClass)
          Sets the name of the css class applied to a tree node when the mouse cursor is over it This value can also be specified on a node basis
 void setNodeSelectedStyleClass(java.lang.String nodeSelectedClass)
          Sets the name of the css class applied to selected tree nodes This value can also be specified on a node basis
 void setNodeStyleClass(java.lang.String nodeClass)
          Sets the name of the css class applied to tree nodes This value can also be specified on a node basis
 void setStyle(java.lang.String style)
          Sets the default Style applied to the component
 void setStyleClass(java.lang.String cssClass)
          Sets the name of the css class applied to the component
 
Methods inherited from class com.infragistics.faces.tree.component.TreeView
addCollapseTreeNodeListener, addExpandTreeNodeListener, broadcast, fireCollapseTreeNodeEvent, fireExpandTreeNodeEvent, getBottomPager, getCollapseTreeNodeListener, getCollapseTreeNodeListeners, getExpandedIconUrl, getExpandTreeNodeListener, getExpandTreeNodeListeners, getIconUrl, getSelectedNode, getSelectedNodes, getTopPager, isBottomPagerRendered, isTopPagerRendered, removeCollapseTreeNodeListener, removeExpandTreeNodeListener, setBottomPager, setBottomPagerRendered, setCollapseTreeNodeListener, setExpandedIconUrl, setExpandTreeNodeListener, setIconUrl, setTopPager, setTopPagerRendered
 
Methods inherited from class com.infragistics.faces.shared.component.DataList
addPageChangeListener, addSortListener, firePageChangeEvent, fireSortEvent, getItemCount, getPageChangeListener, getPageChangeListeners, getPageCount, getPageIndex, getPageSize, getSortExpressionIndex, getSortExpressions, getSortListener, getSortListeners, isCustomPagingEnabled, isCustomSortingEnabled, removePageChangeListener, removeSortListener, setCustomPagingEnabled, setCustomSortingEnabled, setItemCount, setPageChangeListener, setPageIndex, setPageSize, setSortExpressions, setSortListener
 
Methods inherited from class com.infragistics.faces.shared.component.DataRepeater
dataBind, encodeBegin, encodeEnd, getDataKeyName, getDataKeyValue, getDataSource, getTemplateItems, processUpdates, processValidators, queueEvent, setDataKeyName, setDataSource, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponentBase
decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_FAMILY

public static java.lang.String COMPONENT_FAMILY

COMPONENT_TYPE

public static java.lang.String COMPONENT_TYPE

RENDERER_TYPE

public static java.lang.String RENDERER_TYPE
Constructor Detail

HtmlTreeView

public HtmlTreeView()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class TreeView

getNodeHoverStyleClass

public java.lang.String getNodeHoverStyleClass()
Returns the name of the css class applied to a tree node when the mouse cursor is over it This value can also be specified on a node basis

Returns:
name of the hover class

getNodeSelectedStyleClass

public java.lang.String getNodeSelectedStyleClass()
Returns the name of the css class applied to selected tree nodes This value can also be specified on a node basis

Returns:
name of the selected class

getNodeStyleClass

public java.lang.String getNodeStyleClass()
Returns the name of the css class applied to tree nodes This value can also be specified on a node basis

Returns:
name of the nodes css class

getStyle

public java.lang.String getStyle()
Returns the default Style applied to the component

Returns:
the style

getStyleClass

public java.lang.String getStyleClass()
Returns the name of the css class applied to the component

Returns:
name of the css class

setNodeHoverStyleClass

public void setNodeHoverStyleClass(java.lang.String cssClass)
Sets the name of the css class applied to a tree node when the mouse cursor is over it This value can also be specified on a node basis

Parameters:
cssClass -

setNodeSelectedStyleClass

public void setNodeSelectedStyleClass(java.lang.String nodeSelectedClass)
Sets the name of the css class applied to selected tree nodes This value can also be specified on a node basis

Parameters:
nodeSelectedClass -

setNodeStyleClass

public void setNodeStyleClass(java.lang.String nodeClass)
Sets the name of the css class applied to tree nodes This value can also be specified on a node basis

Parameters:
nodeClass -

setStyle

public void setStyle(java.lang.String style)
Sets the default Style applied to the component

Parameters:
style -

setStyleClass

public void setStyleClass(java.lang.String cssClass)
Sets the name of the css class applied to the component

Parameters:
cssClass -

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class TreeView

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class TreeView