ValueBinding (Java EE 5)

Java EE API


javax.faces.el Class ValueBinding

java.lang.Object
  extended by javax.faces.el.ValueBinding

Deprecated. This has been replaced by ValueExpression.


ValueBinding 是一个对象,可以用来访问操作或值绑定表达式所表示的属性。通过调用此 Web 应用程序的 javax.faces.application.Application 实例的 createValueBinding() 方法,可以获得用于特定值绑定的不可变 ValueBinding

英文文档:

public abstract class ValueBinding
extends Object

ValueBinding is an object that can be used to access the property represented by an action or value binding expression. An immutable ValueBinding for a particular value binding can be acquired by calling the createValueBinding() method of the Application instance for this web application.


Constructor Summary
 
Method Summary
 String
abstract  Class
abstract  Object
abstract  boolean
abstract  void
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public ValueBinding()
英文文档:

ValueBinding

public ValueBinding()
Deprecated. 
Method Detail

abstract public Object getValue(FacesContext context) throws EvaluationException, PropertyNotFoundException

相对于指定的 FacesContext,返回此 ValueBinding 表示的属性的值。

context 当前请求的 FacesContext
ThrowsEvaluationException: 如果获取值时抛出异常(抛出的异常必须作为此异常的 cause 属性包含在内)
ThrowsNullPointerException: 如果 contextnull
ThrowsPropertyNotFoundException: 如果指定的属性名称不存在,或者不可读
英文文档:

getValue

public abstract Object getValue(FacesContext context)
                         throws EvaluationException,
                                PropertyNotFoundException
Deprecated. 

Return the value of the property represented by this ValueBinding, relative to the specified FacesContext.

Parameters:
context - FacesContext for the current request
Throws:
EvaluationException - if an exception is thrown while getting the value (the thrown exception must be included as the cause property of this exception)
NullPointerException - if context is null
PropertyNotFoundException - if a specified property name does not exist, or is not readable

abstract public void setValue(FacesContext context, Object value) throws EvaluationException, PropertyNotFoundException

相对于指定的 FacesContext,设置此 ValueBinding 表示的属性的值。

context 当前请求的 FacesContext
value 要设置的新值
ThrowsEvaluationException: 如果在设置值时抛出异常(抛出的异常必须作为此异常的 cause 属性包含在内)
ThrowsNullPointerException: 如果 contextnull
ThrowsPropertyNotFoundException: 如果指定的属性名称不存在,或者不可写
英文文档:

setValue

public abstract void setValue(FacesContext context,
                              Object value)
                       throws EvaluationException,
                              PropertyNotFoundException
Deprecated. 

Set the value of the property represented by this ValueBinding, relative to the specified FacesContext.

Parameters:
context - FacesContext for the current request
value - The new value to be set
Throws:
EvaluationException - if an exception is thrown while setting the value (the thrown exception must be included as the cause property of this exception)
NullPointerException - if context is null
PropertyNotFoundException - if a specified property name does not exist, or is not writeable

abstract public boolean isReadOnly(FacesContext context) throws EvaluationException, PropertyNotFoundException

如果已知指定属性的指定属性不可变,则返回 true;否则返回 false

context 当前请求的 FacesContext
ThrowsEvaluationException: 如果获取属性的描述期间抛出异常(抛出的异常必须作为此异常的 cause 属性包含在内)
ThrowsNullPointerException: 如果 contextnull
ThrowsPropertyNotFoundException: 如果指定的属性名称不存在
英文文档:

isReadOnly

public abstract boolean isReadOnly(FacesContext context)
                            throws EvaluationException,
                                   PropertyNotFoundException
Deprecated. 

Return true if the specified property of the specified property is known to be immutable; otherwise, return false.

Parameters:
context - FacesContext for the current request
Throws:
EvaluationException - if an exception is thrown while getting the description of the property (the thrown exception must be included as the cause property of this exception)
NullPointerException - if context is null
PropertyNotFoundException - if a specified property name does not exist

abstract public Class<T> getType(FacesContext context) throws EvaluationException, PropertyNotFoundException

相对于指定的 FacesContext,返回此 ValueBinding 表示的属性的类型。

context 当前请求的 FacesContext
ThrowsEvaluationException: 如果获取属性的描述期间抛出异常(抛出的异常必须作为此异常的 cause 属性包含在内)
ThrowsNullPointerException: 如果 contextnull
ThrowsPropertyNotFoundException: 如果指定的属性名称不存在
英文文档:

getType

public abstract Class getType(FacesContext context)
                       throws EvaluationException,
                              PropertyNotFoundException
Deprecated. 

Return the type of the property represented by this ValueBinding, relative to the specified FacesContext.

Parameters:
context - FacesContext for the current request
Throws:
EvaluationException - if an exception is thrown while getting the description of the property (the thrown exception must be included as the cause property of this exception)
NullPointerException - if context is null
PropertyNotFoundException - if a specified property name does not exist

public String getExpressionString()

返回据以构建 ValueBinding 的表达式 String(可能为 null),包括分界符。

英文文档:

getExpressionString

public String getExpressionString()
Deprecated. 

Return the (possibly null) expression String, including the delimiters, from which this ValueBinding was built.



Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!