|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
EditableValueHolder is an extension of ValueHolder
that describes additional features supported by editable components,
including ValueChangeEvent
s and Validator
s.
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. |
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. |
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. |
boolean |
isImmediate()
Return the "immediate" state for this component. |
boolean |
isLocalValueSet()
Return the "local value set" state for this component. |
boolean |
isRequired()
Return the "required field" 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 |
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 |
setImmediate(boolean immediate)
Set the "immediate" state for this component. |
void |
setLocalValueSet(boolean localValueSet)
Sets the "local value set" state for this component. |
void |
setRequired(boolean required)
Set the "required field" state for this component. |
void |
setSubmittedValue(java.lang.Object submittedValue)
Set the submittedValue value of this component. |
void |
setValid(boolean valid)
Set a flag indicating whether the local value of this component is valid (no conversion error has occurred). |
void |
setValidator(javax.faces.el.MethodBinding validatorBinding)
Set a MethodBinding pointing at a
method that will be used to validate the current
value of this component. |
void |
setValueChangeListener(javax.faces.el.MethodBinding valueChangeMethod)
Set a MethodBinding instance
method that will be called after any registered
ValueChangeListener s have been notified of a value change. |
Methods inherited from interface javax.faces.component.ValueHolder |
getConverter, getLocalValue, getValue, setConverter, setValue |
Method Detail |
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
.
public void setSubmittedValue(java.lang.Object submittedValue)
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
.
submittedValue
- The new submitted valuepublic boolean isLocalValueSet()
setValue()
automatically reset
this property to true
.
public void setLocalValueSet(boolean localValueSet)
public boolean isValid()
Return a flag indicating whether the local value of this component is valid (no conversion error has occurred).
public void setValid(boolean valid)
Set a flag indicating whether the local value of this component is valid (no conversion error has occurred).
valid
- The new valid flagpublic boolean isRequired()
Return the "required field" state for this component.
public void setRequired(boolean required)
Set the "required field" state for this component.
required
- The new "required field" statepublic boolean isImmediate()
Return the "immediate" state for this component.
public void setImmediate(boolean immediate)
Set the "immediate" state for this component. When
set to true, the component's value will be converted
and validated immediately in the Apply Request Values
phase, and ValueChangeEvent
s will be delivered
in that phase as well. The default value for this
property must be false
.
immediate
- The new "immediate" statepublic 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).
public void setValidator(javax.faces.el.MethodBinding validatorBinding)
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
.
validatorBinding
- The new MethodBinding
instancepublic 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).
public void setValueChangeListener(javax.faces.el.MethodBinding valueChangeMethod)
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).
valueChangeMethod
- The new method binding instancepublic void addValidator(javax.faces.validator.Validator validator)
Add a Validator
instance to the set associated with
this component.
validator
- The Validator
to add
java.lang.NullPointerException
- if validator
is nullpublic 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.
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.
validator
- The Validator
to removepublic void addValueChangeListener(javax.faces.event.ValueChangeListener listener)
Add a new ValueChangeListener
to the set of listeners
interested in being notified when ValueChangeEvent
s occur.
listener
- The ValueChangeListener
to be added
java.lang.NullPointerException
- if listener
is null
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.
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.
listener
- The ValueChangeListener
to be removed
java.lang.NullPointerException
- if listener
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |