-
- All Known Subinterfaces:
- EditableValueHolder
- All Known Implementing Classes:
- HtmlBody, HtmlDoctype, HtmlHead, HtmlInputFile, HtmlInputHidden, HtmlInputSecret, HtmlInputText, HtmlInputTextarea, HtmlOutcomeTargetButton, HtmlOutcomeTargetLink, HtmlOutputFormat, HtmlOutputLabel, HtmlOutputLink, HtmlOutputText, HtmlSelectBooleanCheckbox, HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu, HtmlSelectOneListbox, HtmlSelectOneMenu, HtmlSelectOneRadio, UIInput, UIOutcomeTarget, UIOutput, UISelectBoolean, UISelectMany, UISelectOne, UIViewParameter
public interface ValueHolder
ValueHolder is an interface that may be implemented by any concrete
UIComponent
that wishes to support a local value, as well as access data in the model tier via a value expression, and support conversion between String and the model tier data's native data type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Converter
getConverter()
Return theConverter
(if any) that is registered for thisUIComponent
.Object
getLocalValue()
Return the local value of thisUIComponent
(if any), without evaluating any associatedValueExpression
.Object
getValue()
Gets the value of thisUIComponent
.void
setConverter(Converter converter)
Set theConverter
(if any) that is registered for thisUIComponent
.void
setValue(Object value)
Set the value of thisUIComponent
(if any).
-
-
-
Method Detail
-
getLocalValue
Object getLocalValue()
Return the local value of this
UIComponent
(if any), without evaluating any associatedValueExpression
.
-
getValue
Object getValue()
Gets the value of this
UIComponent
. If validation failed, as indicated byFacesContext.isValidationFailed()
returningtrue
, always return the local value. Otherwise, first, consult the local value property of this component. If non-null
return it. Ifnull
, see if we have aValueExpression
for thevalue
property. If so, return the result of evaluating the property, otherwise returnnull
. Note that because the specification forUIComponent.setValueBinding(java.lang.String, javax.faces.el.ValueBinding)
requires a call through toUIComponent.setValueExpression(java.lang.String, javax.el.ValueExpression)
, legacy tags will continue to work.
-
setValue
void setValue(Object value)
Set the value of this
UIComponent
(if any).- Parameters:
value
- The new local value
-
getConverter
Converter getConverter()
Return the
Converter
(if any) that is registered for thisUIComponent
.
-
setConverter
void setConverter(Converter converter)
Set the
Converter
(if any) that is registered for thisUIComponent
.- Parameters:
converter
- NewConverter
(ornull
)
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/faces/component/valueholder.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.