|
|||||||||
| Home >> All >> org >> apache >> struts >> faces >> [ application overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.struts.faces.application
Class PropertyResolverImpl

java.lang.Objectjavax.faces.el.PropertyResolver
org.apache.struts.faces.application.PropertyResolverImpl
- public class PropertyResolverImpl
- extends javax.faces.el.PropertyResolver
Custom PropertyResolver implementation that adds support
for DynaBean property access to the facilities of the default
PropertyResolver provided by JavaServer Faces.
This class implements the following specific rules:
- Indexed variants of each call are directly passed through to the
PropertyResolverinstance that we are wrapping. - If the specified base object is an instance of
DynaActionForm, and the requested property name ismap, maintain compatibility with the way that JSP and JSTL expressions can access this property:getValue()will return the result of callinggetMap()on the base object.setValue()will throw an exception, because the map of property values is a read-only property of theDynaActionFormclass.isReadOnly()returnstrue.getType()returns theClassobject forjava.util.Map.
- If the specified base object is an instance of
DynaBean, provide access to its named properties as follows:getValue()will return the result of callingget()on the base object.setValue()will callset()on the base object.isReadOnly()returnsfalse(because the DynaBean APIs provide no mechanism to make this determination, but most implementations will provide mutable properties).getType()returns theClassobject for the underlying dynamic property.
- Named variant calls with any other type of base object are
passed through to the
PropertyResolverthat we are wrapping.
- Version:
- $Rev: 54934 $ $Date: 2004-10-16 18:07:50 +0100 (Sat, 16 Oct 2004) $
| Field Summary | |
private static org.apache.commons.logging.Log |
log
The Log instance for this class. |
private javax.faces.el.PropertyResolver |
resolver
The PropertyResolver instance that we are wrapping,
which will be used to perform operations on beans that are not
recognized by this class. |
| Constructor Summary | |
PropertyResolverImpl(javax.faces.el.PropertyResolver resolver)
Construct a new PropertyResolver instance, wrapping the
specified instance using the Decorator pattern such that this class need
implement only the new functionality it supports, and not need to
re-implement the basic facilities. |
|
| Method Summary | |
private org.apache.commons.beanutils.DynaProperty |
getDynaProperty(org.apache.commons.beanutils.DynaBean bean,
java.lang.String name)
Return the DynaProperty describing the specified
property of the specified DynaBean, or null
if there is no such property defined on the underlying
DynaClass. |
java.lang.Class |
getType(java.lang.Object base,
int index)
Return the java.lang.Class representing the type of
value at the specified index of the specified base object, or
null if this value is null. |
java.lang.Class |
getType(java.lang.Object base,
java.lang.Object name)
Return the java.lang.Class representing the type of
the specified property of the specified base object, if it can be
determined; otherwise return null. |
java.lang.Object |
getValue(java.lang.Object base,
int index)
Return the value at the specified index of the specified base object. |
java.lang.Object |
getValue(java.lang.Object base,
java.lang.Object name)
Return the value of the property with the specified name from the specified base object. |
boolean |
isReadOnly(java.lang.Object base,
int index)
Return true if the value at the specified index of
the specified base object is known to be immutable; otherwise,
return false. |
boolean |
isReadOnly(java.lang.Object base,
java.lang.Object name)
Return true if the specified property of the specified
base object is known to be immutable; otherwise, return
false. |
void |
setValue(java.lang.Object base,
int index,
java.lang.Object value)
Set the value at the specified index of the specified base object. |
void |
setValue(java.lang.Object base,
java.lang.Object name,
java.lang.Object value)
Set the specified value of the property with the specified name on the specified base object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
log
private static final org.apache.commons.logging.Log log
The
Loginstance for this class.
resolver
private javax.faces.el.PropertyResolver resolver
The
PropertyResolverinstance that we are wrapping, which will be used to perform operations on beans that are not recognized by this class.
| Constructor Detail |
PropertyResolverImpl
public PropertyResolverImpl(javax.faces.el.PropertyResolver resolver)
Construct a new
PropertyResolverinstance, wrapping the specified instance using the Decorator pattern such that this class need implement only the new functionality it supports, and not need to re-implement the basic facilities.
| Method Detail |
getValue
public java.lang.Object getValue(java.lang.Object base, java.lang.Object name) throws javax.faces.el.PropertyNotFoundException
Return the value of the property with the specified name from the specified base object.
getValue
public java.lang.Object getValue(java.lang.Object base, int index) throws javax.faces.el.PropertyNotFoundException
Return the value at the specified index of the specified base object.
setValue
public void setValue(java.lang.Object base, java.lang.Object name, java.lang.Object value) throws javax.faces.el.PropertyNotFoundException
Set the specified value of the property with the specified name on the specified base object.
setValue
public void setValue(java.lang.Object base, int index, java.lang.Object value) throws javax.faces.el.PropertyNotFoundException
Set the value at the specified index of the specified base object.
isReadOnly
public boolean isReadOnly(java.lang.Object base, java.lang.Object name) throws javax.faces.el.PropertyNotFoundException
Return
trueif the specified property of the specified base object is known to be immutable; otherwise, returnfalse.
isReadOnly
public boolean isReadOnly(java.lang.Object base, int index) throws javax.faces.el.PropertyNotFoundException
Return
trueif the value at the specified index of the specified base object is known to be immutable; otherwise, returnfalse.
getType
public java.lang.Class getType(java.lang.Object base, java.lang.Object name) throws javax.faces.el.PropertyNotFoundException
Return the
java.lang.Classrepresenting the type of the specified property of the specified base object, if it can be determined; otherwise returnnull.
getType
public java.lang.Class getType(java.lang.Object base, int index) throws javax.faces.el.PropertyNotFoundException
Return the
java.lang.Classrepresenting the type of value at the specified index of the specified base object, ornullif this value isnull.
getDynaProperty
private org.apache.commons.beanutils.DynaProperty getDynaProperty(org.apache.commons.beanutils.DynaBean bean, java.lang.String name) throws javax.faces.el.PropertyNotFoundException
Return the
DynaPropertydescribing the specified property of the specifiedDynaBean, ornullif there is no such property defined on the underlyingDynaClass.
|
|||||||||
| Home >> All >> org >> apache >> struts >> faces >> [ application overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC