|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
org.apache.myfaces.custom.tree2.UITreeData
@JSFComponent public class UITreeData
TreeData is a UIComponent that supports binding data stored in a tree represented
by a TreeNode instance. During iterative processing over the tree nodes in the
data model, the object for the current node is exposed as a request attribute under the key
specified by the var property. Renderers of this
component should use the appropriate facet to assist in rendering.
| Field Summary | |
|---|---|
static String |
COMPONENT_FAMILY
|
static String |
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 | |
|---|---|
UITreeData()
Constructor |
|
| Method Summary | |
|---|---|
void |
broadcast(javax.faces.event.FacesEvent event)
|
void |
collapseAll()
Collapse all nodes by default. |
void |
collapsePath(String[] nodePath)
Expands all of the nodes in the specfied path. |
String |
createUniqueId(javax.faces.context.FacesContext context,
String seed)
|
void |
encodeBegin(javax.faces.context.FacesContext context)
|
void |
encodeEnd(javax.faces.context.FacesContext context)
|
void |
expandAll()
Epands all nodes by default. |
void |
expandPath(String[] nodePath)
Expands all of the nodes in the specfied path. |
String |
getContainerClientId(javax.faces.context.FacesContext context)
|
TreeModel |
getDataModel()
Returns a previously cached TreeModel, if any, or sets the cache variable to either the
current value (if its a TreeModel) or to a new instance of TreeModel (if it's a
TreeNode) with the provided value object as the root node. |
protected javax.faces.context.FacesContext |
getFacesContext()
|
String |
getFamily()
|
Object |
getModel()
Gets the model of the TreeData - due to backwards-compatibility, this can also be retrieved by getValue. |
TreeNode |
getNode()
Calls through to the TreeModel and returns the current TreeNode or null. |
String |
getNodeId()
|
String[] |
getPathInformation(String nodeId)
Gets an array of String containing the ID's of all of the TreeNodes in the path to
the specified node. |
Object |
getValue()
Deprecated. |
String |
getVar()
Return the request-scope attribute under which the data object for the current node will be exposed when iterating. |
boolean |
invokeOnComponent(javax.faces.context.FacesContext context,
String clientId,
javax.faces.component.ContextCallback callback)
|
boolean |
isLastChild(String nodeId)
Indicates whether or not the specified TreeNode is the last child in the List
of children. |
boolean |
isNodeExpanded()
Indicates whether or not the current TreeNode is expanded. |
boolean |
isNodeSelected()
Indicates whether or not the current TreeNode is selected. |
void |
processDecodes(javax.faces.context.FacesContext context)
|
protected void |
processNodes(javax.faces.context.FacesContext context,
int processAction,
TreeWalker walker)
|
void |
processUpdates(javax.faces.context.FacesContext context)
|
void |
processValidators(javax.faces.context.FacesContext context)
|
void |
queueEvent(javax.faces.event.FacesEvent event)
|
void |
restoreState(javax.faces.context.FacesContext context,
Object state)
|
Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setModel(Object model)
Sets the model of the TreeData - due to backwards-compatibility, this can also be set by calling setValue. |
void |
setNodeId(String nodeId)
|
void |
setNodeSelected(javax.faces.event.ActionEvent event)
Implements the ActionListener interface. |
void |
setValue(Object value)
Deprecated. |
void |
setValueBinding(String name,
javax.faces.el.ValueBinding binding)
|
void |
setVar(String var)
Set the request-scope attribute under which the data object for the current node wil be exposed when iterating. |
void |
toggleExpanded()
Toggle the expanded state of the current node. |
boolean |
visitTree(javax.faces.component.visit.VisitContext context,
javax.faces.component.visit.VisitCallback callback)
|
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addClientBehavior, addFacesListener, clearInitialState, decode, encodeAll, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
| Constructor Detail |
|---|
public UITreeData()
| Method Detail |
|---|
public String getFamily()
getFamily in class javax.faces.component.UIComponentpublic Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class javax.faces.component.UIComponentBase
public void restoreState(javax.faces.context.FacesContext context,
Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class javax.faces.component.UIComponentBase
public void encodeEnd(javax.faces.context.FacesContext context)
throws IOException
encodeEnd in class javax.faces.component.UIComponentBaseIOExceptionpublic void queueEvent(javax.faces.event.FacesEvent event)
queueEvent in class javax.faces.component.UIComponentBase
public void broadcast(javax.faces.event.FacesEvent event)
throws javax.faces.event.AbortProcessingException
broadcast in class javax.faces.component.UIComponentBasejavax.faces.event.AbortProcessingExceptionpublic void processDecodes(javax.faces.context.FacesContext context)
processDecodes in class javax.faces.component.UIComponentBasepublic void processValidators(javax.faces.context.FacesContext context)
processValidators in class javax.faces.component.UIComponentBasepublic void processUpdates(javax.faces.context.FacesContext context)
processUpdates in class javax.faces.component.UIComponentBasepublic String getContainerClientId(javax.faces.context.FacesContext context)
getContainerClientId in class javax.faces.component.UIComponent
public void setValueBinding(String name,
javax.faces.el.ValueBinding binding)
setValueBinding in class javax.faces.component.UIComponentBase
public void encodeBegin(javax.faces.context.FacesContext context)
throws IOException
encodeBegin in class javax.faces.component.UIComponentBaseIOExceptionpublic void setValue(Object value)
value - The new valuepublic Object getModel()
getModel in interface Treepublic void setModel(Object model)
setModel in interface Treemodel - The new modelpublic Object getValue()
public void setVar(String var)
setVar in interface Treevar - The new request-scope attribute namepublic String getVar()
getVar in interface Treepublic TreeNode getNode()
TreeModel and returns the current TreeNode or null.
getNode in interface Treepublic String getNodeId()
getNodeId in interface Treepublic void setNodeId(String nodeId)
setNodeId in interface Tree
public boolean invokeOnComponent(javax.faces.context.FacesContext context,
String clientId,
javax.faces.component.ContextCallback callback)
throws javax.faces.FacesException
invokeOnComponent in class javax.faces.component.UIComponentBasejavax.faces.FacesException
public boolean visitTree(javax.faces.component.visit.VisitContext context,
javax.faces.component.visit.VisitCallback callback)
visitTree in class javax.faces.component.UIComponentBaseprotected javax.faces.context.FacesContext getFacesContext()
getFacesContext in class javax.faces.component.UIComponentBasepublic String[] getPathInformation(String nodeId)
TreeNodes in the path to
the specified node. The path information will be an array of String objects
representing node ID's. The array will starting with the ID of the root node and end with
the ID of the specified node.
getPathInformation in interface TreenodeId - The id of the node for whom the path information is needed.
public boolean isLastChild(String nodeId)
TreeNode is the last child in the List
of children. If the node id provided corresponds to the root node, this returns true.
isLastChild in interface TreenodeId - The ID of the node to check
public TreeModel getDataModel()
TreeModel, if any, or sets the cache variable to either the
current value (if its a TreeModel) or to a new instance of TreeModel (if it's a
TreeNode) with the provided value object as the root node.
getDataModel in interface Treepublic void expandAll()
expandAll in interface Treepublic void collapseAll()
collapseAll in interface Treepublic void expandPath(String[] nodePath)
expandPath in interface TreenodePath - The path to expand.public void collapsePath(String[] nodePath)
collapsePath in interface TreenodePath - The path to expand.
protected void processNodes(javax.faces.context.FacesContext context,
int processAction,
TreeWalker walker)
public void toggleExpanded()
toggleExpanded in interface Treepublic boolean isNodeExpanded()
TreeNode is expanded.
isNodeExpanded in interface Treepublic void setNodeSelected(javax.faces.event.ActionEvent event)
ActionListener interface. Basically, this
method is used to listen for node selection events (when a user has clicked on a
leaf node.)
setNodeSelected in interface Treeevent - ActionEventpublic boolean isNodeSelected()
TreeNode is selected.
isNodeSelected in interface Tree
public String createUniqueId(javax.faces.context.FacesContext context,
String seed)
createUniqueId in interface javax.faces.component.UniqueIdVendor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||