|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.faces.component Interface ValueHolder
- All Known Subinterfaces:
- EditableValueHolder
- All Known Implementing Classes:
- HtmlInputHidden, HtmlInputSecret, HtmlInputText, HtmlInputTextarea, HtmlOutputFormat, HtmlOutputLabel, HtmlOutputLink, HtmlOutputText, HtmlSelectBooleanCheckbox, HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu, HtmlSelectOneListbox, HtmlSelectOneMenu, HtmlSelectOneRadio, UIInput, UIOutput, UISelectBoolean, UISelectMany, UISelectOne
public interface ValueHolder
ValueHolder 是可以由任何希望支持本地值以及通过值表达式 访问模型层中的数据,并支持在 String 和模型层数据的本机数据类型之间转换的具体 UIComponent 实现的接口。
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 | |
|---|---|
Converter |
getConverter()
Return the Converter (if any)
that is registered for this UIComponent. |
Object |
getLocalValue()
Return the local value of this UIComponent (if any),
without evaluating any associated ValueExpression. |
Object |
getValue()
Gets the value of this UIComponent. |
void |
setConverter(Converter converter)
Set the Converter (if any)
that is registered for this UIComponent. |
void |
setValue(Object value)
Set the value of this UIComponent (if any). |
| Method Detail |
|---|
public Object
getLocalValue()
返回此 UIComponent 的本地值(如果有),不用对任何关联的 ValueExpression 求值。
getLocalValue
Object getLocalValue()
Return the local value of this
UIComponent(if any), without evaluating any associatedValueExpression.
public Object
getValue()
获取此 UIComponent 的值。首先,参考此组件的本地值属性。如果为非 null,则将其返回。如果为 null,则查看我们是否有 value 属性的 ValueExpression。如果有,则返回对属性求值的结果,否则返回 null。请注意,因为 UIComponent#setValueBinding 规范要求调用 UIComponent#setValueExpression,所以遗留标记将继续起作用。
getValue
Object getValue()
Gets the value of this
UIComponent. First, consult the local value property of this component. If non-nullreturn it. Ifnull, see if we have aValueExpressionfor thevalueproperty. 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.
public void
setValue(Object value)
设置此 UIComponent 的值(如果有)。
| value | 新的本地值 |
setValue
void setValue(Object value)
Set the value of this
UIComponent(if any).- Parameters:
value- The new local value
public Converter
getConverter()
返回为此 UIComponent 注册的 Converter(如果有)。
getConverter
Converter getConverter()
Return the
Converter(if any) that is registered for thisUIComponent.
public void
setConverter(Converter converter)
设置为此 UIComponent 注册的 Converter(如果有)。
| converter |
新的 Converter(或 null) |
setConverter
void setConverter(Converter converter)
Set the
Converter(if any) that is registered for thisUIComponent.- Parameters:
converter- NewConverter(ornull)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!