|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase 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
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 |
LAYOUT_KEY
This is the location of the XML file that declares the layout for the PanelGroup. |
static java.lang.String |
SELECTED_SUFFIX
This is the suffix appended to the client id when forming a request attribute key. |
Fields inherited from class com.sun.rave.web.ui.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 ValueChangeEvent s
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.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.Object |
getLocalValue()
Return the local value of this UIComponent (if any),
without evaluating any associated ValueBinding . |
java.lang.String |
getSelected()
Specifies the client id of the selected tree node. |
java.lang.Object |
getSubmittedValue()
Return the submittedValue value of this component. |
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 Validator s 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 ValueChangeListener s have
been notified of a value change. |
javax.faces.event.ValueChangeListener[] |
getValueChangeListeners()
Return the set of registered ValueChangeListener s for
this component instance. |
protected boolean |
isDifferent(java.lang.Object val1,
java.lang.Object val2)
Return true if the objects are not equal. |
boolean |
isLocalValueSet()
Return the "local value set" state for this component. |
boolean |
isValid()
Return a flag indicating whether the local value of this component is valid (no conversion error has occurred). |
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
ValueChangeEvent s 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 clientId)
Deprecated. Use #setValue(Object) |
void |
selectTreeNode(TreeNode treeNode)
Deprecated. Use #setValue(Object) |
void |
setConverter(javax.faces.convert.Converter conv)
Set the Converter (if any) that is registered for
this UIComponent . |
void |
setLocalValueSet(boolean value)
Sets the "local value set" state for this component. |
void |
setSelected(java.lang.String s)
Specifies the client id of the selected tree node. |
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 ValueChangeListener s have
been notified of a value change. |
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 . |
protected void |
validateValue(javax.faces.context.FacesContext context,
java.lang.Object newValue)
|
Methods inherited from class com.sun.rave.web.ui.component.TreeBase |
getFamily, getStyle, getStyleClass, getText, isClientSide, isExpandOnSelect, isImmediate, isRequired, isVisible, setClientSide, setExpandOnSelect, setImmediate, setRequired, setStyle, setStyleClass, setText, setVisible |
Methods inherited from class com.sun.rave.web.ui.component.TreeNode |
addActionListener, fireTurnerEvent, getActionListeners, getHandleIcon, getImageKeys, getParentTreeNode, removeActionListener, toggleNode |
Methods inherited from class com.sun.rave.web.ui.component.TreeNodeBase |
getAction, getActionListener, getImageURL, getTarget, getToolTip, getUrl, isExpanded, setAction, setActionListener, setExpanded, setImageURL, setTarget, setToolTip, setUrl |
Methods inherited from class com.sun.rave.web.ui.component.TemplateComponentBase |
getChild, getChild, getLayoutDefinition, getLayoutDefinitionKey, setLayoutDefinitionKey |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.EditableValueHolder |
isImmediate, isRequired, setImmediate, setRequired |
Field Detail |
public static final java.lang.String JAVA_SCRIPT_THEME_KEY
This is the Theme
key used to retrieve
the JavaScript needed for this component.
Theme.getPathToJSFile(String)
,
Constant Field Valuespublic static final java.lang.String LAYOUT_KEY
This is the location of the XML file that declares the layout for the PanelGroup. (layout/tree.xml)
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.
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.
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).
Constructor Detail |
public Tree()
Method Detail |
public java.lang.String getSelected()
TreeBase
Specifies the client id of the selected tree node.
getSelected
in class TreeBase
public void setSelected(java.lang.String s)
TreeBase
Specifies the client id of the selected tree node.
setSelected
in class TreeBase
TreeBase.getSelected()
public javax.faces.convert.Converter getConverter()
Return the Converter
(if any) that is registered for
this UIComponent
.
Not implemented for this component.
getConverter
in interface javax.faces.component.ValueHolder
public void setConverter(javax.faces.convert.Converter conv)
Set the Converter
(if any) that is registered for
this UIComponent
.
Not implemented for this component.
setConverter
in interface javax.faces.component.ValueHolder
conv
- New Converter
(or null
)public java.lang.Object getLocalValue()
Return the local value of this UIComponent
(if any),
without evaluating any associated ValueBinding
.
getLocalValue
in interface javax.faces.component.ValueHolder
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.
getValue
in interface javax.faces.component.ValueHolder
public void setValue(java.lang.Object val)
Set the value of this UIComponent
(if any).
setValue
in interface javax.faces.component.ValueHolder
val
- The new local valuepublic 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
.
getSubmittedValue
in interface javax.faces.component.EditableValueHolder
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
.
setSubmittedValue
in interface javax.faces.component.EditableValueHolder
value
- The new submitted value.public boolean isLocalValueSet()
Return the "local value set" state for this component. Calls to
setValue()
automatically reset this property to
true
.
isLocalValueSet
in interface javax.faces.component.EditableValueHolder
public void setLocalValueSet(boolean value)
Sets the "local value set" state for this component.
setLocalValueSet
in interface javax.faces.component.EditableValueHolder
public boolean isValid()
Return a flag indicating whether the local value of this component is valid (no conversion error has occurred).
isValid
in interface javax.faces.component.EditableValueHolder
public void setValid(boolean value)
Set a flag indicating whether the local value of this component is valid (no conversion error has occurred).
setValid
in interface javax.faces.component.EditableValueHolder
value
- The new valid flag.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.
getValidator
in interface javax.faces.component.EditableValueHolder
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.
setValidator
in interface javax.faces.component.EditableValueHolder
valBinding
- The new MethodBinding
instance.public void addValidator(javax.faces.validator.Validator validator)
Add a Validator
instance to the set associated with
this component.
Not implemented for this component.
addValidator
in interface javax.faces.component.EditableValueHolder
validator
- The Validator
to add.public javax.faces.validator.Validator[] getValidators()
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.
getValidators
in interface javax.faces.component.EditableValueHolder
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.
removeValidator
in interface javax.faces.component.EditableValueHolder
validator
- The Validator
to remove.public javax.faces.el.MethodBinding getValueChangeListener()
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).
getValueChangeListener
in interface javax.faces.component.EditableValueHolder
public void setValueChangeListener(javax.faces.el.MethodBinding method)
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).
setValueChangeListener
in interface javax.faces.component.EditableValueHolder
method
- The new MethodBinding instance.public void addValueChangeListener(javax.faces.event.ValueChangeListener listener)
Add a new ValueChangeListener
to the set of listeners
interested in being notified when ValueChangeEvent
s
occur.
addValueChangeListener
in interface javax.faces.component.EditableValueHolder
listener
- The ValueChangeListener
to be added.public javax.faces.event.ValueChangeListener[] getValueChangeListeners()
Return the set of registered ValueChangeListener
s for
this component instance. If there are no registered listeners, a
zero-length array is returned.
getValueChangeListeners
in interface javax.faces.component.EditableValueHolder
public void removeValueChangeListener(javax.faces.event.ValueChangeListener listener)
Remove an existing ValueChangeListener
(if any) from
the set of listeners interested in being notified when
ValueChangeEvent
s occur.
removeValueChangeListener
in interface javax.faces.component.EditableValueHolder
listener
- The ValueChangeListener
to be removed.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()
.
context
- FacesContext
for the request we are processing.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
.
event
- FacesEvent
to be broadcast
javax.faces.event.AbortProcessingException
- Signal the JSF implementation
that no further processing on the current event should be performedpublic 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.
rendered
property of this
UIComponent
is false
, skip
further processing.processUpdates()
method of all
facets and children of this UIComponent
, in the
order determined by a call to
getFacetsAndChildren()
.
context
- FacesContext
for this requestpublic void updateModel(javax.faces.context.FacesContext context)
Perform the following algorithm to update the model data associated with this component, if any, as appropriate.
valid
property of this component is
false
, take no further action.localValueSet
property of this
component is false
, take no further action.ValueBinding
for value
exists, take no further action.setValue()
method of the
ValueBinding
to update the value that the
ValueBinding
points at.setValue()
method returns successfully:
localValueSet
property of
this component to false.setValue()
method call fails:
addMessage()
on the specified
FacesContext
instance.valid
property of this
component to false
.
context
- FacesContext
for the request we are
processing.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.
rendered
property of this
UIComponent
is false
, skip
further processing.processDecodes()
method of all
facets and children of this UIComponent
, in the
order determined by a call to
getFacetsAndChildren()
.decode()
method of this
component.RuntimeException
is thrown during decode
processing, call FacesContext.renderResponse
and re-throw the exception.
context
- FacesContext
for the request.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.
public void validate(javax.faces.context.FacesContext context)
Perform the following algorithm to validate the local value of
this UIInput
.
getSubmittedValue()
. If this returns null,
exit without further processing. (This indicates that no
value was submitted for this component.)getConvertedValue
.validateValue
.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.
context
- FacesContext
for the current request.protected boolean isDifferent(java.lang.Object val1, java.lang.Object val2)
Return true
if the objects are not equal.
val1
- Value 1
protected void validateValue(javax.faces.context.FacesContext context, java.lang.Object newValue)
public void selectTreeNode(TreeNode treeNode)
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.
treeNode
- The TreeNode
to be selected.public void selectTreeNode(java.lang.String clientId)
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.
clientId
- Client id of the TreeNode
to be selected.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.
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.
public java.lang.Object saveState(javax.faces.context.FacesContext context)
TreeBase
Save the state of this component.
saveState
in interface javax.faces.component.StateHolder
saveState
in class TreeBase
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
TreeBase
Restore the state of this component.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class TreeBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |