com.sun.webui.jsf.component
Class Tree

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.sun.webui.jsf.component.TreeNode
              extended by com.sun.webui.jsf.component.Tree
All Implemented Interfaces:
java.io.Serializable, javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class Tree
extends TreeNode
implements javax.faces.component.EditableValueHolder

The Tree component is used to display a tree structure in the rendered HTML page.

See Also:
Serialized Form

Field Summary
static java.lang.String COOKIE_SUFFIX
           This is the suffix appended to the client id to form the key to the cookie Map needed to retrieve the tree selection.
static java.lang.String COOKIE_SUFFIX_EXPAND
           This is the suffix appended to the client id to form the key to the cookie Map needed to retrieve the node that may need to be expanded (because it was just selected).
static java.lang.String JAVA_SCRIPT_THEME_KEY
           This is the Theme key used to retrieve the JavaScript needed for this component.
static java.lang.String SELECTED_SUFFIX
           This is the suffix appended to the client id when forming a request attribute key.
static java.lang.String TREE_CONTENT_FACET_NAME
           String constant representing the content facet name.
static java.lang.String TREE_IMAGE_FACET_NAME
           String constant representing the image facet name.
 
Fields inherited from class com.sun.webui.jsf.component.TreeNode
CONTENT_FACET_KEY, IMAGE_FACET_KEY
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
Tree()
          Constructor.
 
Method Summary
 void addValidator(javax.faces.validator.Validator validator)
           Add a Validator instance to the set associated with this component.
 void addValueChangeListener(javax.faces.event.ValueChangeListener listener)
           Add a new ValueChangeListener to the set of listeners interested in being notified when ValueChangeEvents occur.
 void broadcast(javax.faces.event.FacesEvent event)
           In addition to to the default UIComponent#broadcast processing, pass the ValueChangeEvent being broadcast to the method referenced by valueChangeListener.
 void decode(javax.faces.context.FacesContext context)
           Decode any new state of this UIComponent from the request contained in the specified FacesContext, and store this state as needed.
 javax.el.MethodExpression getActionExpression()
          The action attribute is used to specify the action to take when this component is activated by the user.
 javax.el.MethodExpression getActionListenerExpression()
          The actionListener attribute is used to specify a method to handle an action event that is triggered when a component is activated by the user.
 javax.faces.convert.Converter getConverter()
           Return the Converter (if any) that is registered for this UIComponent.
 java.lang.String getCookieExpandNode()
           This method will return the TreeNode client ID that is selected according the browser cookie.
 java.lang.String getCookieSelectedTreeNode()
           This method returns the TreeNode client ID that is selected according the browser cookie.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getImageURL()
          Absolute or relative URL to the image to be rendered for the tree node.
 java.lang.Object getLocalValue()
           Return the local value of this UIComponent (if any), without evaluating any associated ValueBinding.
 boolean getRendersChildren()
          This component renders its children
 java.lang.String getSelected()
          Returns the id of the selected tree node.
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 java.lang.Object getSubmittedValue()
           Return the submittedValue value of this component.
 java.lang.String getTarget()
          The resource at the specified URL is displayed in the frame that is specified with the target attribute.
 java.lang.String getUrl()
          Indicates that the text that is specified with the text attribute should be rendered as a hyperlink that resolves to the specified URL.
 javax.faces.el.MethodBinding getValidator()
           Return a MethodBinding pointing at a method that will be used to validate the current value of this component.
 javax.faces.validator.Validator[] getValidators()
           Return the set of registered Validators for this component instance.
 java.lang.Object getValue()
           Gets the value of this UIComponent.
 javax.faces.el.MethodBinding getValueChangeListener()
           Return a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change.
 javax.faces.event.ValueChangeListener[] getValueChangeListeners()
           Return the set of registered ValueChangeListeners for this component instance.
 javax.el.ValueExpression getValueExpression(java.lang.String name)
          Return the ValueExpression stored for the specified name (if any), respecting any property aliases.
 boolean isClientSide()
           Set the clientSide attribute to true to specify that the Tree component should run on the client.
 boolean isExpanded()
          Set the expanded attribute to true to display the tree node as expanded when the component is initially rendered.
 boolean isExpandOnSelect()
          Flag indicating that folder / container nodes will automatically expand when they are selected.
 boolean isImmediate()
          Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.
 boolean isLocalValueSet()
           Return the "local value set" state for this component.
 boolean isRequired()
          Flag indicating that the user must select a value for this tree.
 boolean isValid()
           Return a flag indicating whether the local value of this component is valid (no conversion error has occurred).
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void processDecodes(javax.faces.context.FacesContext context)
           Perform the component tree processing required by the Apply Request Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
 void processUpdates(javax.faces.context.FacesContext context)
           Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
 void processValidators(javax.faces.context.FacesContext context)
           In addition to the standard processValidators behavior inherited from UIComponentBases, calls validate() if the immediate property is false (which is the default); if the component is invalid afterwards, calls FacesContext.renderResponse.
 void removeValidator(javax.faces.validator.Validator validator)
           Remove a Validator instance from the set associated with this component, if it was previously associated.
 void removeValueChangeListener(javax.faces.event.ValueChangeListener listener)
           Remove an existing ValueChangeListener (if any) from the set of listeners interested in being notified when ValueChangeEvents occur.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Save the state of this component.
 void selectTreeNode(java.lang.String id)
          Deprecated. Use #setValue(Object)
 void selectTreeNode(TreeNode treeNode)
          Deprecated. Use #setValue(Object)
 void setClientSide(boolean clientSide)
           Set the clientSide attribute to true to specify that the Tree component should run on the client.
 void setConverter(javax.faces.convert.Converter conv)
           Set the Converter (if any) that is registered for this UIComponent.
 void setExpandOnSelect(boolean expandOnSelect)
          Flag indicating that folder / container nodes will automatically expand when they are selected.
 void setId(java.lang.String id)
          The component identifier for this component.
 void setImmediate(boolean immediate)
          Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.
 void setLocalValueSet(boolean value)
           Sets the "local value set" state for this component.
 void setRendered(boolean rendered)
          Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page.
 void setRequired(boolean required)
          Flag indicating that the user must select a value for this tree.
 void setSelected(java.lang.String selected)
          Specify the id of the selected tree node.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setSubmittedValue(java.lang.Object value)
           Set the submittedValue value of this component.
 void setValid(boolean value)
           Set a flag indicating whether the local value of this component is valid (no conversion error has occurred).
 void setValidator(javax.faces.el.MethodBinding valBinding)
           Set a MethodBinding pointing at a method that will be used to validate the current value of this component.
 void setValue(java.lang.Object val)
           Set the value of this UIComponent (if any).
 void setValueChangeListener(javax.faces.el.MethodBinding method)
           Set a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change.
 void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
          Set the ValueExpression stored for the specified name (if any), respecting any property aliases.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void updateModel(javax.faces.context.FacesContext context)
           Perform the following algorithm to update the model data associated with this component, if any, as appropriate.
 void validate(javax.faces.context.FacesContext context)
           Perform the following algorithm to validate the local value of this UIInput.
 
Methods inherited from class com.sun.webui.jsf.component.TreeNode
addActionListener, getAbsoluteRoot, getActionListeners, getChildNode, getChildTreeNodes, getContentHyperlink, getHandleIcon, getImageKeys, getNodeImageHyperlink, getParentTreeNode, getText, getToolTip, getTurnerImageHyperlink, removeActionListener, setActionExpression, setActionListenerExpression, setExpanded, setImageURL, setTarget, setText, setToolTip, setUrl
 
Methods inherited from class javax.faces.component.UIComponentBase
encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_SCRIPT_THEME_KEY

public static final java.lang.String JAVA_SCRIPT_THEME_KEY

This is the Theme key used to retrieve the JavaScript needed for this component.

See Also:
Theme.getPathToJSFile(String), Constant Field Values

SELECTED_SUFFIX

public static final java.lang.String SELECTED_SUFFIX

This is the suffix appended to the client id when forming a request attribute key. The value associated with the generated key indicates which node should be selected. The renderer uses this information to generate JavaScript to select this node, overriding the previous selection.

See Also:
Constant Field Values

COOKIE_SUFFIX

public static final java.lang.String COOKIE_SUFFIX

This is the suffix appended to the client id to form the key to the cookie Map needed to retrieve the tree selection.

See Also:
Constant Field Values

COOKIE_SUFFIX_EXPAND

public static final java.lang.String COOKIE_SUFFIX_EXPAND

This is the suffix appended to the client id to form the key to the cookie Map needed to retrieve the node that may need to be expanded (because it was just selected).

See Also:
Constant Field Values

TREE_CONTENT_FACET_NAME

public static final java.lang.String TREE_CONTENT_FACET_NAME

String constant representing the content facet name.

See Also:
Constant Field Values

TREE_IMAGE_FACET_NAME

public static final java.lang.String TREE_IMAGE_FACET_NAME

String constant representing the image facet name.

See Also:
Constant Field Values
Constructor Detail

Tree

public Tree()
Constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class TreeNode

setId

public void setId(java.lang.String id)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.

Overrides:
setId in class TreeNode

setRendered

public void setRendered(boolean rendered)
Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.

Overrides:
setRendered in class TreeNode

getTarget

public java.lang.String getTarget()
The resource at the specified URL is displayed in the frame that is specified with the target attribute. Values such as "_blank" that are valid for the target attribute of the HTML element are also valid for this attribute in the tree components. The target attribute is useful only with the url attribute, and does not apply when a facet is used.

Overrides:
getTarget in class TreeNode

getUrl

public java.lang.String getUrl()
Indicates that the text that is specified with the text attribute should be rendered as a hyperlink that resolves to the specified URL. If the imageURL attribute is used with the url attribute, the image is hyperlinked. The url attribute does not apply to facets.

Overrides:
getUrl in class TreeNode

getImageURL

public java.lang.String getImageURL()
Absolute or relative URL to the image to be rendered for the tree node. Note that you cannot use the imageURL to display a theme image in the tree. You should use an image facet that contains a ui:image or ui:imageHyperlink tag to use a theme image. The imageURL attribute is overridden by the image facet.

When the imageURL attribute is used with the url attribute, the image is hyperlinked.

Overrides:
getImageURL in class TreeNode

getActionListenerExpression

public javax.el.MethodExpression getActionListenerExpression()
The actionListener attribute is used to specify a method to handle an action event that is triggered when a component is activated by the user. The actionListener attribute value must be a JavaServer Faces EL expression that resolves to a method in a backing bean. The method must take a single parameter that is an ActionEvent, and its return type must be void. The class that defines the method must implement the java.io.Serializable interface or javax.faces.component.StateHolder interface.

In the TreeNode component, the method specified with the actionListener atttribute is invoked when the node's handle icon is clicked.

Overrides:
getActionListenerExpression in class TreeNode

getActionExpression

public javax.el.MethodExpression getActionExpression()
The action attribute is used to specify the action to take when this component is activated by the user. The value of the action attribute must be one of the following:

In the Tree and TreeNode components, the action applies only when attributes are used to define the tree and tree nodes. When facets are used, the action attribute does not apply to the facets.

Overrides:
getActionExpression in class TreeNode

isExpanded

public boolean isExpanded()
Description copied from class: TreeNode

Set the expanded attribute to true to display the tree node as expanded when the component is initially rendered. When a node is expanded, its child tree nodes are displayed. By default, nodes are collapsed initially.

Overrides:
isExpanded in class TreeNode

isClientSide

public boolean isClientSide()

Set the clientSide attribute to true to specify that the Tree component should run on the client. By default, this attribute is false, so the Tree component interacts with the server. In a client-side tree, expanding and collapsing of the tree nodes happens only in the browser. In a server-side tree, a request is made to the server each time the tree nodes are expanded or collapsed. If you use the actionListener attribute to fire events, you must use a server side tree so that the event can be processed.


setClientSide

public void setClientSide(boolean clientSide)

Set the clientSide attribute to true to specify that the Tree component should run on the client. By default, this attribute is false, so the Tree component interacts with the server. In a client-side tree, expanding and collapsing of the tree nodes happens only in the browser. In a server-side tree, a request is made to the server each time the tree nodes are expanded or collapsed. If you use the actionListener attribute to fire events, you must use a server side tree so that the event can be processed.

See Also:
isClientSide()

isExpandOnSelect

public boolean isExpandOnSelect()

Flag indicating that folder / container nodes will automatically expand when they are selected. This attribute is true by default. If you want a tree's container nodes to expand only when the handle icons are clicked, set expandOnSelect to false.


setExpandOnSelect

public void setExpandOnSelect(boolean expandOnSelect)

Flag indicating that folder / container nodes will automatically expand when they are selected. This attribute is true by default. If you want a tree's container nodes to expand only when the handle icons are clicked, set expandOnSelect to false.

See Also:
isExpandOnSelect()

isImmediate

public boolean isImmediate()

Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase. May be desired for this component when required is true (although most likely not).

Specified by:
isImmediate in interface javax.faces.component.EditableValueHolder

setImmediate

public void setImmediate(boolean immediate)

Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase. May be desired for this component when required is true (although most likely not).

Specified by:
setImmediate in interface javax.faces.component.EditableValueHolder
See Also:
isImmediate()

isRequired

public boolean isRequired()

Flag indicating that the user must select a value for this tree. Default value is false. This attribute should be hidden from the application developer as it does not make sense in the context of the tree. The isRequired()/setRequired() methods have to be maintained as Tree implements EditableValueHolder.

Specified by:
isRequired in interface javax.faces.component.EditableValueHolder

setRequired

public void setRequired(boolean required)

Flag indicating that the user must select a value for this tree. Default value is false.

Specified by:
setRequired in interface javax.faces.component.EditableValueHolder
See Also:
isRequired()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

Overrides:
getStyle in class TreeNode

setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

Overrides:
setStyle in class TreeNode
See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

Overrides:
getStyleClass in class TreeNode

setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

Overrides:
setStyleClass in class TreeNode
See Also:
getStyleClass()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

Overrides:
isVisible in class TreeNode

setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

Overrides:
setVisible in class TreeNode
See Also:
isVisible()

getRendersChildren

public boolean getRendersChildren()
This component renders its children

Overrides:
getRendersChildren in class TreeNode

getSelected

public java.lang.String getSelected()

Returns the id of the selected tree node. Should be cast to a String and nothing else.


setSelected

public void setSelected(java.lang.String selected)

Specify the id of the selected tree node. Should specify a String object. Also note that this should NOT be the client ID of the selected node.

See Also:
getSelected()

getValueExpression

public javax.el.ValueExpression getValueExpression(java.lang.String name)

Return the ValueExpression stored for the specified name (if any), respecting any property aliases.

Overrides:
getValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to retrieve

setValueExpression

public void setValueExpression(java.lang.String name,
                               javax.el.ValueExpression binding)

Set the ValueExpression stored for the specified name (if any), respecting any property aliases.

Overrides:
setValueExpression in class javax.faces.component.UIComponentBase
Parameters:
name - Name of value binding to set
binding - ValueBinding to set, or null to remove

getConverter

public javax.faces.convert.Converter getConverter()

Return the Converter (if any) that is registered for this UIComponent.

Not implemented for this component.

Specified by:
getConverter in interface javax.faces.component.ValueHolder

setConverter

public void setConverter(javax.faces.convert.Converter conv)

Set the Converter (if any) that is registered for this UIComponent.

Not implemented for this component.

Specified by:
setConverter in interface javax.faces.component.ValueHolder
Parameters:
conv - New Converter (or null)

getLocalValue

public java.lang.Object getLocalValue()

Return the local value of this UIComponent (if any), without evaluating any associated ValueBinding.

Specified by:
getLocalValue in interface javax.faces.component.ValueHolder

getValue

public java.lang.Object getValue()

Gets the value of this UIComponent. First, consult the local value property of this component. If non-null return it. If non-null, see if we have a ValueBinding for the value property. If so, return the result of evaluating the property, otherwise return null.

Specified by:
getValue in interface javax.faces.component.ValueHolder

setValue

public void setValue(java.lang.Object val)

Set the value of this UIComponent (if any).

Specified by:
setValue in interface javax.faces.component.ValueHolder
Parameters:
val - The new local value

getSubmittedValue

public java.lang.Object getSubmittedValue()

Return the submittedValue value of this component. This method should only be used by the encodeBegin() and/or encodeEnd() methods of this component, or its corresponding Renderer.

Specified by:
getSubmittedValue in interface javax.faces.component.EditableValueHolder

setSubmittedValue

public void setSubmittedValue(java.lang.Object value)

Set the submittedValue value of this component. This method should only be used by the decode() and validate() method of this component, or its corresponding Renderer.

Specified by:
setSubmittedValue in interface javax.faces.component.EditableValueHolder
Parameters:
value - The new submitted value.

isLocalValueSet

public boolean isLocalValueSet()

Return the "local value set" state for this component. Calls to setValue() automatically reset this property to true.

Specified by:
isLocalValueSet in interface javax.faces.component.EditableValueHolder

setLocalValueSet

public void setLocalValueSet(boolean value)

Sets the "local value set" state for this component.

Specified by:
setLocalValueSet in interface javax.faces.component.EditableValueHolder

isValid

public boolean isValid()

Return a flag indicating whether the local value of this component is valid (no conversion error has occurred).

Specified by:
isValid in interface javax.faces.component.EditableValueHolder

setValid

public void setValid(boolean value)

Set a flag indicating whether the local value of this component is valid (no conversion error has occurred).

Specified by:
setValid in interface javax.faces.component.EditableValueHolder
Parameters:
value - The new valid flag.

getValidator

public javax.faces.el.MethodBinding getValidator()

Return a MethodBinding pointing at a method that will be used to validate the current value of this component. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).

Not implemented for this component.

Specified by:
getValidator in interface javax.faces.component.EditableValueHolder

setValidator

public void setValidator(javax.faces.el.MethodBinding valBinding)

Set a MethodBinding pointing at a method that will be used to validate the current value of this component. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).

Any method referenced by such an expression must be public, with a return type of void, and accept parameters of type FacesContext, UIComponent, and Object.

Not implemented for this component.

Specified by:
setValidator in interface javax.faces.component.EditableValueHolder
Parameters:
valBinding - The new MethodBinding instance.

addValidator

public void addValidator(javax.faces.validator.Validator validator)

Add a Validator instance to the set associated with this component.

Not implemented for this component.

Specified by:
addValidator in interface javax.faces.component.EditableValueHolder
Parameters:
validator - The Validator to add.

getValidators

public javax.faces.validator.Validator[] getValidators()

Return the set of registered Validators for this component instance. If there are no registered validators, a zero-length array is returned.

Not implemented for this component.

Specified by:
getValidators in interface javax.faces.component.EditableValueHolder

removeValidator

public void removeValidator(javax.faces.validator.Validator validator)

Remove a Validator instance from the set associated with this component, if it was previously associated. Otherwise, do nothing.

Not implemented for this component.

Specified by:
removeValidator in interface javax.faces.component.EditableValueHolder
Parameters:
validator - The Validator to remove.

getValueChangeListener

public javax.faces.el.MethodBinding getValueChangeListener()

Return a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).

Specified by:
getValueChangeListener in interface javax.faces.component.EditableValueHolder

setValueChangeListener

public void setValueChangeListener(javax.faces.el.MethodBinding method)

Set a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).

Specified by:
setValueChangeListener in interface javax.faces.component.EditableValueHolder
Parameters:
method - The new MethodBinding instance.

addValueChangeListener

public void addValueChangeListener(javax.faces.event.ValueChangeListener listener)

Add a new ValueChangeListener to the set of listeners interested in being notified when ValueChangeEvents occur.

Specified by:
addValueChangeListener in interface javax.faces.component.EditableValueHolder
Parameters:
listener - The ValueChangeListener to be added.

getValueChangeListeners

public javax.faces.event.ValueChangeListener[] getValueChangeListeners()

Return the set of registered ValueChangeListeners for this component instance. If there are no registered listeners, a zero-length array is returned.

Specified by:
getValueChangeListeners in interface javax.faces.component.EditableValueHolder

removeValueChangeListener

public void removeValueChangeListener(javax.faces.event.ValueChangeListener listener)

Remove an existing ValueChangeListener (if any) from the set of listeners interested in being notified when ValueChangeEvents occur.

Specified by:
removeValueChangeListener in interface javax.faces.component.EditableValueHolder
Parameters:
listener - The ValueChangeListener to be removed.

decode

public void decode(javax.faces.context.FacesContext context)

Decode any new state of this UIComponent from the request contained in the specified FacesContext, and store this state as needed.

During decoding, events may be enqueued for later processing (by event listeners who have registered an interest), by calling queueEvent().

Overrides:
decode in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for the request we are processing.

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException

In addition to to the default UIComponent#broadcast processing, pass the ValueChangeEvent being broadcast to the method referenced by valueChangeListener.

Overrides:
broadcast in class TreeNode
Parameters:
event - FacesEvent to be broadcast
Throws:
javax.faces.event.AbortProcessingException - Signal the JSF implementation that no further processing on the current event should be performed

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)

Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.

Overrides:
processUpdates in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for this request

updateModel

public void updateModel(javax.faces.context.FacesContext context)

Perform the following algorithm to update the model data associated with this component, if any, as appropriate.

Parameters:
context - FacesContext for the request we are processing.

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)

Perform the component tree processing required by the Apply Request Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.

Overrides:
processDecodes in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for the request.

processValidators

public void processValidators(javax.faces.context.FacesContext context)

In addition to the standard processValidators behavior inherited from UIComponentBases, calls validate() if the immediate property is false (which is the default); if the component is invalid afterwards, calls FacesContext.renderResponse. If a RuntimeException is thrown during validation processing, calls FacesContext.renderResponse and re-throws the exception.

Overrides:
processValidators in class javax.faces.component.UIComponentBase

validate

public void validate(javax.faces.context.FacesContext context)

Perform the following algorithm to validate the local value of this UIInput.

Parameters:
context - FacesContext for the current request.

selectTreeNode

public void selectTreeNode(TreeNode treeNode)
Deprecated. Use #setValue(Object)

This method accepts the TreeNode which is to be selected. The previous TreeNode that was selected will unselected. No state is saved with this operation, the state is maintained on the client.

Parameters:
treeNode - The TreeNode to be selected.

selectTreeNode

public void selectTreeNode(java.lang.String id)
Deprecated. Use #setValue(Object)

This method accepts the clientId of a TreeNode which is to be selected. The previous TreeNode that was selected will unselected. No state is saved with this operation, the state is maintained on the client-side.

Parameters:
id - The id of the TreeNode to be selected.

getCookieSelectedTreeNode

public java.lang.String getCookieSelectedTreeNode()

This method returns the TreeNode client ID that is selected according the browser cookie. This method is generally only useful during the decode process.

Returns:
The selected tree node (according to the cookie).

getCookieExpandNode

public java.lang.String getCookieExpandNode()

This method will return the TreeNode client ID that is selected according the browser cookie. This method is only useful during the decode process as the cookie will typically be reset to null immediately after the request is processed.

Returns:
The selected tree node (according to the cookie).

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Description copied from class: TreeNode

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class TreeNode

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class TreeNode


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.