com.ibm.xsp.page.compiled
Interface PageExpressionEvaluator


public interface PageExpressionEvaluator

Used in one of the classes in the generated XPage .java file, not intended to be used programmatically by application developers or third party Java developers. See AbstractCompiledPage. A utility object for creating method and value bindings and handling the results of load time bindings.


Method Summary
 javax.faces.el.MethodBinding createMethodBinding(javax.faces.component.UIComponent component, java.lang.String expression, java.lang.String[] names, java.lang.Class<?>[] types, java.lang.String sourceId)
          Create a MethodBinding instance
 javax.faces.el.ValueBinding createValueBinding(javax.faces.component.UIComponent component, java.lang.String expression, java.lang.String sourceId, java.lang.Class<?> expectedClassType)
          Create a value binding instance
 java.lang.String evaluateAsString(javax.faces.component.UIComponent component, java.lang.String expression, java.lang.String sourceId, java.lang.Class<?> expectedClassType)
          Evaluate a computed expression
 java.lang.Object getBindingValue(javax.faces.component.UIComponent closest, java.lang.String expression, java.lang.Class<?> primitiveClass, java.lang.String sourceReferenceId, java.lang.Class<?> expectedClassType)
          Used to resolve the result of a primitive value binding.
 java.lang.Object getBindingValue(javax.faces.component.UIComponent closest, java.lang.String expression, java.lang.String sourceReferenceId, java.lang.Class<?> expectedClassType)
          Used to resolve the result of a non-primitive value binding.
 java.lang.String getValueAsString(java.lang.Object runtimeValue, java.lang.String propertyName)
           
 void setValue(java.lang.Object object, java.lang.String propertyName, java.lang.Object value, java.lang.Class<?> type)
          Used to set the result of evaluating a value binding property onto a non-component object.
 void setValue(javax.faces.component.UIComponent component, java.lang.String propertyName, java.lang.Object runtimeValue, boolean isAttribute, boolean expectsPrimitive)
          Used to set the result of a value binding as the value of some property on a component.
 

Method Detail

evaluateAsString

java.lang.String evaluateAsString(javax.faces.component.UIComponent component,
                                  java.lang.String expression,
                                  java.lang.String sourceId,
                                  java.lang.Class<?> expectedClassType)
Evaluate a computed expression

Parameters:
component -
expression -
sourceId -
Returns:

createValueBinding

javax.faces.el.ValueBinding createValueBinding(javax.faces.component.UIComponent component,
                                               java.lang.String expression,
                                               java.lang.String sourceId,
                                               java.lang.Class<?> expectedClassType)
Create a value binding instance

Parameters:
component -
expression -
sourceId -
Returns:

createMethodBinding

javax.faces.el.MethodBinding createMethodBinding(javax.faces.component.UIComponent component,
                                                 java.lang.String expression,
                                                 java.lang.String[] names,
                                                 java.lang.Class<?>[] types,
                                                 java.lang.String sourceId)
Create a MethodBinding instance

Parameters:
component -
expression -
names -
types -
sourceId -
Returns:

getBindingValue

java.lang.Object getBindingValue(javax.faces.component.UIComponent closest,
                                 java.lang.String expression,
                                 java.lang.Class<?> primitiveClass,
                                 java.lang.String sourceReferenceId,
                                 java.lang.Class<?> expectedClassType)
Used to resolve the result of a primitive value binding. If it resolves to a runtime value binding string, a value binding created and returned as the result. Otherwise the result will be returned as a String, Integer, Short etc, depending on the primitiveClass passed in.

Parameters:
closest - the closest component.
expression - the String value binding to resolve.
primitiveClass - a primitive class, like String.class, int.class, short.class etc.
Returns:
the result of the value binding, or if it returned a runtime value binding string, a value binding created from the result.

getBindingValue

java.lang.Object getBindingValue(javax.faces.component.UIComponent closest,
                                 java.lang.String expression,
                                 java.lang.String sourceReferenceId,
                                 java.lang.Class<?> expectedClassType)
Used to resolve the result of a non-primitive value binding. If it resolves to a runtime value binding string, a value binding created and returned as the result.

Parameters:
closest - the closest component.
expression - the String value binding to resolve.
Returns:
the result of the value binding, or if it returned a runtime value binding string, a value binding created from the result.

getValueAsString

java.lang.String getValueAsString(java.lang.Object runtimeValue,
                                  java.lang.String propertyName)

setValue

void setValue(javax.faces.component.UIComponent component,
              java.lang.String propertyName,
              java.lang.Object runtimeValue,
              boolean isAttribute,
              boolean expectsPrimitive)
Used to set the result of a value binding as the value of some property on a component. The value may be of an attribute or a property.

Parameters:
component - the object to set the property value on.
propertyName - the property to set.
isAttribute - The property is declared as an attribute (rather than a property that has get/set methods).
expectsPrimitive - If the property is primitive.
runtimeValue -

setValue

void setValue(java.lang.Object object,
              java.lang.String propertyName,
              java.lang.Object value,
              java.lang.Class<?> type)
Used to set the result of evaluating a value binding property onto a non-component object.

Parameters:
object - the object to set the property value on.
propertyName - the property to set.
value - the value to set the property to.
type - the class that the value binding was expected to resolve to. (May be a primitive class, like int.class.) The value is often also allowed to be a ValueBinding.