-
- All Superinterfaces:
- ValueHolder
- All Known Implementing Classes:
- HtmlInputFile, HtmlInputHidden, HtmlInputSecret, HtmlInputText, HtmlInputTextarea, HtmlSelectBooleanCheckbox, HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu, HtmlSelectOneListbox, HtmlSelectOneMenu, HtmlSelectOneRadio, UIInput, UISelectBoolean, UISelectMany, UISelectOne, UIViewParameter
public interface EditableValueHolder extends ValueHolder
EditableValueHolder is an extension of ValueHolder that describes additional features supported by editable components, including
ValueChangeEvent
s andValidator
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description void
addValidator(Validator validator)
Add aValidator
instance to the set associated with this component.void
addValueChangeListener(ValueChangeListener listener)
Add a newValueChangeListener
to the set of listeners interested in being notified whenValueChangeEvent
s occur.Object
getSubmittedValue()
Return the submittedValue value of this component.MethodBinding
getValidator()
Deprecated.getValidators()
should be used instead.Validator[]
getValidators()
Return the set of registeredValidator
s for this component instance.MethodBinding
getValueChangeListener()
Deprecated.UsegetValueChangeListeners()
instead.ValueChangeListener[]
getValueChangeListeners()
Return the set of registeredValueChangeListener
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(Validator validator)
Remove aValidator
instance from the set associated with this component, if it was previously associated.void
removeValueChangeListener(ValueChangeListener listener)
Remove an existingValueChangeListener
(if any) from the set of listeners interested in being notified whenValueChangeEvent
s occur.void
resetValue()
Convenience method to reset this component's value to the un-initialized state.
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(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(MethodBinding validatorBinding)
Deprecated.UseaddValidator(javax.faces.validator.Validator)
instead, obtaining the argumentValidator
by creating an instance ofMethodExpressionValidator
.void
setValueChangeListener(MethodBinding valueChangeMethod)
Deprecated.UseaddValueChangeListener(javax.faces.event.ValueChangeListener)
instead, obtaining the argumentValueChangeListener
by creating an instance ofMethodExpressionValueChangeListener
.-
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter, setValue
-
-
-
-
Method Detail
-
getSubmittedValue
Object getSubmittedValue()
Return the submittedValue value of this component. This method should only be used by the
encodeBegin()
and/orencodeEnd()
methods of this component, or its correspondingRenderer
. The action taken based on whether the value isnull
, empty, or non-null
is determined based on the value of thejavax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
context-param.
-
resetValue
void resetValue()
Convenience method to reset this component's value to the un-initialized state.
- Since:
- 2.0
-
setSubmittedValue
void setSubmittedValue(Object submittedValue)
Set the submittedValue value of this component. This method should only be used by the
decode()
andvalidate()
method of this component, or its correspondingRenderer
. The action taken based on whether the value isnull
, empty, or non-null
is determined based on the value of thejavax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
context-param.- Parameters:
submittedValue
- The new submitted value
-
isLocalValueSet
boolean isLocalValueSet()
Return the "local value set" state for this component. Calls tosetValue()
automatically reset this property totrue
.
-
setLocalValueSet
void setLocalValueSet(boolean localValueSet)
Sets the "local value set" state for this component.
-
isValid
boolean isValid()
Return a flag indicating whether the local value of this component is valid (no conversion error has occurred).
-
setValid
void setValid(boolean valid)
Set a flag indicating whether the local value of this component is valid (no conversion error has occurred).
- Parameters:
valid
- The new valid flag
-
isRequired
boolean isRequired()
Return the "required field" state for this component.
-
setRequired
void setRequired(boolean required)
Set the "required field" state for this component.
- Parameters:
required
- The new "required field" state
-
isImmediate
boolean isImmediate()
Return the "immediate" state for this component.
-
setImmediate
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 befalse
.- Parameters:
immediate
- The new "immediate" state
-
getValidator
MethodBinding getValidator()
Deprecated.getValidators()
should be used instead.If
setValidator(javax.faces.el.MethodBinding)
was not previously called for this instance, this method must returnnull
. If it was called, this method must return the exactMethodBinding
instance that was passed tosetValidator(javax.faces.el.MethodBinding)
.This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the
immediate
property).
-
setValidator
void setValidator(MethodBinding validatorBinding)
Deprecated. UseaddValidator(javax.faces.validator.Validator)
instead, obtaining the argumentValidator
by creating an instance ofMethodExpressionValidator
.Wrap the argument
validatorBinding
in an implementation ofValidator
and store it in the internal data structure that backs thegetValidators()
method, taking care to over-write any instance that was stored by a previous call tosetValidator
.The argument 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 typeFacesContext
,UIComponent
, andObject
.- Parameters:
validatorBinding
- The newMethodBinding
instance
-
getValueChangeListener
MethodBinding getValueChangeListener()
Deprecated. UsegetValueChangeListeners()
instead.If
setValueChangeListener(javax.faces.el.MethodBinding)
was not previously called for this instance, this method must returnnull
. If it was called, this method must return the exactMethodBinding
instance that was passed tosetValueChangeListener(javax.faces.el.MethodBinding)
.
-
setValueChangeListener
void setValueChangeListener(MethodBinding valueChangeMethod)
Deprecated. UseaddValueChangeListener(javax.faces.event.ValueChangeListener)
instead, obtaining the argumentValueChangeListener
by creating an instance ofMethodExpressionValueChangeListener
.Wrap the argument
valueChangeMethod
in an implementation ofValueChangeListener
and store it in the internal data structure that backs thegetValueChangeListeners()
method, taking care to over-write any instance that was stored by a previous call tosetValueChangeListener
.This argument 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 a parameter of typeValueChangeEvent
.- Parameters:
valueChangeMethod
- The new method binding instance
-
addValidator
void addValidator(Validator validator)
Add a
Validator
instance to the set associated with this component.- Parameters:
validator
- TheValidator
to add- Throws:
NullPointerException
- ifvalidator
is null
-
getValidators
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.
-
removeValidator
void removeValidator(Validator validator)
Remove a
Validator
instance from the set associated with this component, if it was previously associated. Otherwise, do nothing.- Parameters:
validator
- TheValidator
to remove
-
addValueChangeListener
void addValueChangeListener(ValueChangeListener listener)
Add a new
ValueChangeListener
to the set of listeners interested in being notified whenValueChangeEvent
s occur.- Parameters:
listener
- TheValueChangeListener
to be added- Throws:
NullPointerException
- iflistener
isnull
-
getValueChangeListeners
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.
-
removeValueChangeListener
void removeValueChangeListener(ValueChangeListener listener)
Remove an existing
ValueChangeListener
(if any) from the set of listeners interested in being notified whenValueChangeEvent
s occur.- Parameters:
listener
- TheValueChangeListener
to be removed- Throws:
NullPointerException
- iflistener
isnull
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/faces/component/EditableValueHolder.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.