com.sun.rave.web.ui.faces
Class UIComponentPropertyResolver

java.lang.Object
  extended by javax.faces.el.PropertyResolver
      extended by com.sun.rave.web.ui.faces.UIComponentPropertyResolver

public class UIComponentPropertyResolver
extends javax.faces.el.PropertyResolver

Custom JSF PropertyResolver that, when the base object is a UIComponent, scans for a child with the id specified by the property name.


Constructor Summary
UIComponentPropertyResolver()
           
UIComponentPropertyResolver(javax.faces.el.PropertyResolver original)
          Construct a new UIComponentPropertyResolver that decorates the specified PropertyResolver.
 
Method Summary
 java.lang.Class getType(java.lang.Object base, int index)
          When the base object is a UIComponent, treat the index as the zero-relative index of the child to be retrieved.
 java.lang.Class getType(java.lang.Object base, java.lang.Object property)
          When the base object is a UIComponent, treat the property name as the id of a child component to be retrieved.
 java.lang.Object getValue(java.lang.Object base, int index)
          When the base object is a UIComponent, treat the index as the zero-relative index of the child to be returned.
 java.lang.Object getValue(java.lang.Object base, java.lang.Object property)
          When the base object is a UIComponent, treat the property name as the id of a child component to be returned.
 boolean isReadOnly(java.lang.Object base, int index)
          When the base object is a UIComponent, treat the index as the zero-relative index of the child to be retrieved.
 boolean isReadOnly(java.lang.Object base, java.lang.Object property)
          When the base object is a UIComponent, treat the property name as the id of a child component to be retrieved.
 void setValue(java.lang.Object base, int index, java.lang.Object value)
          When the base object is a UIComponent, treat the index as the zero-relative index of the child to be replaced.
 void setValue(java.lang.Object base, java.lang.Object property, java.lang.Object value)
          When the base object is a UIComponent, treat the property name as the id of a child component to be replaced.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIComponentPropertyResolver

public UIComponentPropertyResolver()

UIComponentPropertyResolver

public UIComponentPropertyResolver(javax.faces.el.PropertyResolver original)

Construct a new UIComponentPropertyResolver that decorates the specified PropertyResolver.

Parameters:
original - Original PropertyResolver to decorate
Method Detail

getValue

public java.lang.Object getValue(java.lang.Object base,
                                 java.lang.Object property)

When the base object is a UIComponent, treat the property name as the id of a child component to be returned. If there is no such child, delegate to the rest of the chain (so that properties of a component may be accessed).

Specified by:
getValue in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
property - Property name

getValue

public java.lang.Object getValue(java.lang.Object base,
                                 int index)

When the base object is a UIComponent, treat the index as the zero-relative index of the child to be returned.

Specified by:
getValue in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
index - Zero-relative child index

setValue

public void setValue(java.lang.Object base,
                     java.lang.Object property,
                     java.lang.Object value)

When the base object is a UIComponent, treat the property name as the id of a child component to be replaced. If there is no such child, delegate to the rest of the chain (so that properties of a component may be accessed).

Specified by:
setValue in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
property - Property name
value - Replacement component

setValue

public void setValue(java.lang.Object base,
                     int index,
                     java.lang.Object value)

When the base object is a UIComponent, treat the index as the zero-relative index of the child to be replaced.

Specified by:
setValue in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
index - Zero-relative child index
value - Replacement component

isReadOnly

public boolean isReadOnly(java.lang.Object base,
                          java.lang.Object property)

When the base object is a UIComponent, treat the property name as the id of a child component to be retrieved. If the specified child actually exists, return false (because replacement is allowed). If there is no such child, delegate to the rest of the chain (so that component properties may be accessed).

Specified by:
isReadOnly in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
property - Property name

isReadOnly

public boolean isReadOnly(java.lang.Object base,
                          int index)

When the base object is a UIComponent, treat the index as the zero-relative index of the child to be retrieved. If the specified child actually exists, return false (because replacement is allowed).

Specified by:
isReadOnly in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
index - Zero-relative child index

getType

public java.lang.Class getType(java.lang.Object base,
                               java.lang.Object property)

When the base object is a UIComponent, treat the property name as the id of a child component to be retrieved. If the specified child actually exists, return javax.faces.component.UIComponent. If there is no such child, delegate to the rest of the chain (so that component properties may be accessed).

Specified by:
getType in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
property - Property name

getType

public java.lang.Class getType(java.lang.Object base,
                               int index)

When the base object is a UIComponent, treat the index as the zero-relative index of the child to be retrieved. If the specified child actually exists, return javax.faces.component.UIComponent.

Specified by:
getType in class javax.faces.el.PropertyResolver
Parameters:
base - Base object
index - Zero-relative child index