| com.sun.rave.web.ui.component.TemplateComponentBase com.sun.rave.web.ui.component.TreeNodeBase com.sun.rave.web.ui.component.TreeNode com.sun.rave.web.ui.component.TreeBase com.sun.rave.web.ui.component.Tree
Tree | public class Tree extends TreeBase implements EditableValueHolder(Code) | | author: Ken Paulsen (ken.paulsen@sun.com) |
Constructor Summary | |
public | Tree() Constructor. |
COOKIE_SUFFIX | final public static String COOKIE_SUFFIX(Code) | | This is the suffix appended to the client id to form the key to the
cookie Map needed to retrieve the tree selection.
|
COOKIE_SUFFIX_EXPAND | final public static String COOKIE_SUFFIX_EXPAND(Code) | | 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).
|
LAYOUT_KEY | final public static String LAYOUT_KEY(Code) | | This is the location of the XML file that declares the layout for
the PanelGroup. (layout/tree.xml)
|
SELECTED_SUFFIX | final public static String SELECTED_SUFFIX(Code) | | 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.
|
Tree | public Tree()(Code) | | Constructor.
|
addValidator | public void addValidator(Validator validator)(Code) | | Add a Validator instance to the set associated with
this component.
Not implemented for this component.
Parameters: validator - The Validator to add. |
addValueChangeListener | public void addValueChangeListener(ValueChangeListener listener)(Code) | | Add a new ValueChangeListener to the set of listeners
interested in being notified when ValueChangeEvent s
occur.
Parameters: listener - The ValueChangeListener to be added. |
broadcast | public void broadcast(FacesEvent event) throws AbortProcessingException(Code) | | In addition to to the default UIComponent#broadcast
processing, pass the ValueChangeEvent being broadcast
to the method referenced by valueChangeListener .
Parameters: event - FacesEvent to be broadcast exception: AbortProcessingException - Signal the JSF implementationthat no further processing on the current event should be performed |
decode | public void decode(FacesContext context)(Code) | | 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() .
Parameters: context - FacesContext for the request we are processing. |
getConverter | public Converter getConverter()(Code) | | Return the Converter (if any) that is registered for
this UIComponent .
Not implemented for this component.
|
getCookieExpandNode | public String getCookieExpandNode()(Code) | | 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.
The selected tree node (according to the cookie). |
getCookieSelectedTreeNode | public String getCookieSelectedTreeNode()(Code) | | This method returns the
TreeNode client ID that is
selected according the browser cookie. This method is generally
only useful during the decode process.
The selected tree node (according to the cookie). |
getLocalValue | public Object getLocalValue()(Code) | | Return the local value of this UIComponent (if any),
without evaluating any associated ValueBinding .
|
getSubmittedValue | public Object getSubmittedValue()(Code) | | 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 .
|
getValidator | public MethodBinding getValidator()(Code) | | 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.
|
getValidators | public Validator[] getValidators()(Code) | | Return the set of registered Validator s for this
component instance. If there are no registered validators, a
zero-length array is returned.
Not implemented for this component.
|
getValue | public Object getValue()(Code) | | 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.
|
getValueChangeListener | public MethodBinding getValueChangeListener()(Code) | | Return a MethodBinding instance method that will be
called after any registered ValueChangeListener s 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).
|
getValueChangeListeners | public ValueChangeListener[] getValueChangeListeners()(Code) | | Return the set of registered ValueChangeListener s for
this component instance. If there are no registered listeners, a
zero-length array is returned.
|
isDifferent | protected boolean isDifferent(Object val1, Object val2)(Code) | | Return true if the objects are not equal.
Parameters: val1 - Value 1 Parameters: val1 - Value 2 true if the 2 values are not equal |
isLocalValueSet | public boolean isLocalValueSet()(Code) | | Return the "local value set" state for this component. Calls to
setValue() automatically reset this property to
true .
|
isValid | public boolean isValid()(Code) | | Return a flag indicating whether the local value of this component
is valid (no conversion error has occurred).
|
processDecodes | public void processDecodes(FacesContext context)(Code) | | 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.
- If the
rendered property of this
UIComponent is false , skip
further processing.
- Call the
processDecodes() method of all
facets and children of this UIComponent , in the
order determined by a call to
getFacetsAndChildren() .
- Call the
decode() method of this
component.
- If a
RuntimeException is thrown during decode
processing, call FacesContext.renderResponse
and re-throw the exception.
Parameters: context - FacesContext for the request. |
processUpdates | public void processUpdates(FacesContext context)(Code) | | 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.
- If the
rendered property of this
UIComponent is false , skip
further processing.
- Call the
processUpdates() method of all
facets and children of this
UIComponent , in the
order determined by a call to
getFacetsAndChildren() .
Parameters: context - FacesContext for this request |
processValidators | public void processValidators(FacesContext context)(Code) | | 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.
|
removeValidator | public void removeValidator(Validator validator)(Code) | | Remove a Validator instance from the set associated
with this component, if it was previously associated. Otherwise,
do nothing.
Not implemented for this component.
Parameters: validator - The Validator to remove. |
removeValueChangeListener | public void removeValueChangeListener(ValueChangeListener listener)(Code) | | Remove an existing ValueChangeListener (if any) from
the set of listeners interested in being notified when
ValueChangeEvent s occur.
Parameters: listener - The ValueChangeListener to be removed. |
restoreState | public void restoreState(FacesContext context, Object state)(Code) | | |
saveState | public Object saveState(FacesContext context)(Code) | | |
selectTreeNode | public void selectTreeNode(TreeNode treeNode)(Code) | | 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(String clientId)(Code) | | 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: clientId - Client id of the TreeNode to be selected. |
setConverter | public void setConverter(Converter conv)(Code) | | Set the Converter (if any) that is registered for
this UIComponent .
Not implemented for this component.
Parameters: conv - New Converter (or null ) |
setLocalValueSet | public void setLocalValueSet(boolean value)(Code) | | Sets the "local value set" state for this component.
|
setSubmittedValue | public void setSubmittedValue(Object value)(Code) | | 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 .
Parameters: value - The new submitted value. |
setValid | public void setValid(boolean value)(Code) | | Set a flag indicating whether the local value of this component
is valid (no conversion error has occurred).
Parameters: value - The new valid flag. |
setValidator | public void setValidator(MethodBinding valBinding)(Code) | | 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.
Parameters: valBinding - The new MethodBinding instance. |
setValue | public void setValue(Object val)(Code) | | Set the value of this
UIComponent (if any).
Parameters: val - The new local value |
setValueChangeListener | public void setValueChangeListener(MethodBinding method)(Code) | | Set a MethodBinding instance method that will be
called after any registered ValueChangeListener s 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).
Parameters: method - The new MethodBinding instance. |
updateModel | public void updateModel(FacesContext context)(Code) | | Perform the following algorithm to update the model data
associated with this component, if any, as appropriate.
- If the
valid property of this component is
false , take no further action.
- If the
localValueSet property of this
component is false , take no further action.
- If no
ValueBinding for value
exists, take no further action.
- Call
setValue() method of the
ValueBinding to update the value that the
ValueBinding points at.
- If the
setValue() method returns successfully:
- Clear the local value of this component.
- Set the
localValueSet property of
this component to false.
- If the
setValue() method call fails:
- Queue an error message by calling
addMessage() on the specified
FacesContext instance.
- Set the
valid property of this
component to false .
Parameters: context - FacesContext for the request we areprocessing. |
validate | public void validate(FacesContext context)(Code) | | Perform the following algorithm to validate the local value of
this UIInput .
- Retrieve the submitted value with
getSubmittedValue() . If this returns null,
exit without further processing. (This indicates that no
value was submitted for this component.)
- Convert the submitted value into a "local value" of the
appropriate data type by calling
getConvertedValue .
- Validate the property by calling
validateValue .
- If the
valid property of this component is
still true , retrieve the previous value of
the component (with getValue() ), store the new
local value using setValue() , and reset the
submitted value to null. If the local value is different
from the previous value of this component, fire a
ValueChangeEvent to be broadcast to all
interested listeners.
Parameters: context - FacesContext for the current request. |
validateValue | protected void validateValue(FacesContext context, Object newValue)(Code) | | |
|
|