Top Description Fields Constructors Methods
com.sun.faces.application

public Class ValueBindingValueExpressionAdapter

extends ValueBinding
implements StateHolder, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.faces.component.StateHolder
Static Imports
com.sun.faces.util.Util.isAnyNull, .Util.loadClass2, .Util.newInstance

Deprecated

as a consequence of ValueBinding being deprecated. See corresponding docs for further information.

Wrap a ValueExpression instance and expose it as a ValueBinding

Author
Jacob Hookom

Field Summary

Modifier and TypeField and Description
private static final long
private boolean
private ValueExpression

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public String
getExpressionString()

Overrides javax.faces.el.ValueBinding.getExpressionString.

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

public Class<T>
getType(FacesContext
FacesContext for the current request
context
)

Implements abstract javax.faces.el.ValueBinding.getType.

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

public Object
getValue(FacesContext
FacesContext for the current request
context
)

Implements abstract javax.faces.el.ValueBinding.getValue.

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

public ValueExpression
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean
isReadOnly(FacesContext
FacesContext for the current request
context
)

Implements abstract javax.faces.el.ValueBinding.isReadOnly.

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

public boolean
isTransient()

Implements javax.faces.component.StateHolder.isTransient.

If true, the Object implementing this interface must not participate in state saving or restoring.

public void
restoreState(FacesContext
the Faces context.
context
,
Object
the state.
state
)

Implements javax.faces.component.StateHolder.restoreState.

Perform any processing required to restore the state from the entries in the state Object.

public Object
saveState(FacesContext
the Faces context.
context
)

Implements javax.faces.component.StateHolder.saveState.

Gets the state of the instance as a Serializable Object.

public void
setTransient(boolean
boolean pass true if this Object will not participate in state saving or restoring, otherwise pass false.
tranzient
)

Implements javax.faces.component.StateHolder.setTransient.

Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.

public void
setValue(FacesContext
FacesContext for the current request
context
,
Object
The new value to be set
value
)

Implements abstract javax.faces.el.ValueBinding.setValue.

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

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
tranzientback to summary
private boolean tranzient
valueExpressionback to summary
private ValueExpression valueExpression

Constructor Detail

ValueBindingValueExpressionAdapterback to summary
public ValueBindingValueExpressionAdapter()
ValueBindingValueExpressionAdapterback to summary
public ValueBindingValueExpressionAdapter(ValueExpression valueExpression)

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

getExpressionStringback to summary
public String getExpressionString()

Overrides javax.faces.el.ValueBinding.getExpressionString.

Doc from javax.faces.el.ValueBinding.getExpressionString.

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

Returns:String

the expression string

getTypeback to summary
public Class<T> getType(FacesContext context) throws EvaluationException, PropertyNotFoundException

Implements abstract javax.faces.el.ValueBinding.getType.

Doc from javax.faces.el.ValueBinding.getType.

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

Parameters
context:FacesContext

FacesContext for the current request

Returns:Class<T>

the Java type of this expression

Exceptions
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)
PropertyNotFoundException:
if a specified property name does not exist
getValueback to summary
public Object getValue(FacesContext context) throws EvaluationException, PropertyNotFoundException

Implements abstract javax.faces.el.ValueBinding.getValue.

Doc from javax.faces.el.ValueBinding.getValue.

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

Parameters
context:FacesContext

FacesContext for the current request

Returns:Object

the value of this expression

Exceptions
EvaluationException:
if an exception is thrown while getting the value (the thrown exception must be included as the cause property of this exception)
PropertyNotFoundException:
if a specified property name does not exist, or is not readable
getWrappedback to summary
public ValueExpression getWrapped()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

isReadOnlyback to summary
public boolean isReadOnly(FacesContext context) throws EvaluationException, PropertyNotFoundException

Implements abstract javax.faces.el.ValueBinding.isReadOnly.

Doc from javax.faces.el.ValueBinding.isReadOnly.

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

Parameters
context:FacesContext

FacesContext for the current request

Returns:boolean

whether or not this expression is read only

Exceptions
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)
PropertyNotFoundException:
if a specified property name does not exist
isTransientback to summary
public boolean isTransient()

Implements javax.faces.component.StateHolder.isTransient.

Doc from javax.faces.component.StateHolder.isTransient.

If true, the Object implementing this interface must not participate in state saving or restoring.

Returns:boolean

true if transient, false otherwise.

restoreStateback to summary
public void restoreState(FacesContext context, Object state)

Implements javax.faces.component.StateHolder.restoreState.

Doc from javax.faces.component.StateHolder.restoreState.

Perform any processing required to restore the state from the entries in the state Object.

If the class that implements this interface has references to instances that also implement StateHolder (such as a UIComponent with event handlers, validators, etc.) this method must call the restoreState method on all those instances as well.

If the state argument is null, take no action and return.

Parameters
context:FacesContext

the Faces context.

state:Object

the state.

saveStateback to summary
public Object saveState(FacesContext context)

Implements javax.faces.component.StateHolder.saveState.

Doc from javax.faces.component.StateHolder.saveState.

Gets the state of the instance as a Serializable Object.

If the class that implements this interface has references to instances that implement StateHolder (such as a UIComponent with event handlers, validators, etc.) this method must call the saveState method on all those instances as well. This method must not save the state of children and facets. That is done via the javax.faces.application.StateManager

This method must not alter the state of the implementing object. In other words, after executing this code:


Object state = component.saveState(facesContext);

component should be the same as before executing it.

The return from this method must be Serializable

Parameters
context:FacesContext

the Faces context.

Returns:Object

the saved state.

setTransientback to summary
public void setTransient(boolean tranzient)

Implements javax.faces.component.StateHolder.setTransient.

Doc from javax.faces.component.StateHolder.setTransient.

Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.

Parameters
tranzient:boolean

boolean pass true if this Object will not participate in state saving or restoring, otherwise pass false.

setValueback to summary
public void setValue(FacesContext context, Object value) throws EvaluationException, PropertyNotFoundException

Implements abstract javax.faces.el.ValueBinding.setValue.

Doc from javax.faces.el.ValueBinding.setValue.

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

Parameters
context:FacesContext

FacesContext for the current request

value:Object

The new value to be set

Exceptions
EvaluationException:
if an exception is thrown while setting the value (the thrown exception must be included as the cause property of this exception)
PropertyNotFoundException:
if a specified property name does not exist, or is not writeable