|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.el.PropertyResolver org.apache.shale.faces.ShalePropertyResolver
public class ShalePropertyResolver
Shale-specific PropertyResolver for evaluating JavaServer Faces value binding and method binding expressions. The following special processing is performed, based on recognizing the type of the base object:
javax.naming.Name
) suitable for passing
to the lookup()
method of the Context
.
The Context has no way to describe whether it is read only or not,
so isReadOnly()
returns false
.map
- Delegates to the original resolver's handling
of the map
property. This is for backwards compatibility
with applications depending on this behavior from the 1.0.0
version of the class.Locale
from the current
view for selecting the appropriate translation.All other evaluations are delegated to the previous implementation that was passed to our constructor.
$Id: ShalePropertyResolver.java 464373 2006-10-16 04:21:54Z rahul $
Constructor Summary | |
---|---|
ShalePropertyResolver(javax.faces.el.PropertyResolver original)
Construct a new ShalePropertyResolver instance. |
Method Summary | |
---|---|
Class |
getType(Object base,
int index)
Convert an index into a corresponding string, and delegate. |
Class |
getType(Object base,
Object property)
For a Context , look up and return the type of the
named object corresponding to the specified property name from this
Context . |
Object |
getValue(Object base,
int index)
Convert an index into a corresponding string, and delegate. |
Object |
getValue(Object base,
Object property)
For a base object of type Context , look up and return
the named object corresponding to the specified property name from
this Context . |
boolean |
isReadOnly(Object base,
int index)
Convert an index into a corresponding string, and delegate. |
boolean |
isReadOnly(Object base,
Object property)
For a Context base object, arbitrarily return
false because we cannot determine if a Context
is read only or not. |
void |
setValue(Object base,
int index,
Object value)
Convert an index into a corresponding string, and delegate. |
void |
setValue(Object base,
Object property,
Object value)
For a base object of type Context , replace any previous
binding for the named object corresponding to the specified property
name into this Context . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShalePropertyResolver(javax.faces.el.PropertyResolver original)
Construct a new ShalePropertyResolver
instance.
original
- Original resolver to delegate to.Method Detail |
---|
public Object getValue(Object base, Object property) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
For a base object of type Context
, look up and return
the named object corresponding to the specified property name from
this Context
.
(Since 1.0.1) For a base object of type LoadBundle
,
treat the property expression as follows:
map
, call the corresponding
property getter and return that value.Map
that
is returned by the getMap()
call.
getValue
in class javax.faces.el.PropertyResolver
base
- Base object from which to return a propertyproperty
- Property to be returned
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic void setValue(Object base, Object property, Object value)
For a base object of type Context
, replace any previous
binding for the named object corresponding to the specified property
name into this Context
.
(Since 1.0.1) For a base object of type LoadBundle
,
throw an exception since all properties of this object are read only.
setValue
in class javax.faces.el.PropertyResolver
base
- Base object in which to store a propertyproperty
- Property to be storedvalue
- Value to be stored
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic boolean isReadOnly(Object base, Object property) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
For a Context
base object, arbitrarily return
false
because we cannot determine if a Context
is read only or not.
(Since 1.0.1) For a LoadBundle
base object,
return true
because all pseudo-properties of
this bundle are considered to be read only.
isReadOnly
in class javax.faces.el.PropertyResolver
base
- Base object from which to return read only stateproperty
- Property to be checked
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic Class getType(Object base, Object property) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
For a Context
, look up and return the type of the
named object corresponding to the specified property name from this
Context
.
(Since 1.0.1) For a LoadBundle
, look up and return
the corresponding object type at runtime, or return Object
for the type to be looked up at design time.
getType
in class javax.faces.el.PropertyResolver
base
- Base object from which to return a property typeproperty
- Property whose type is to be returned
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic Object getValue(Object base, int index) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
Convert an index into a corresponding string, and delegate.
getValue
in class javax.faces.el.PropertyResolver
base
- Base object from which to return a propertyindex
- Index to be returned
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic void setValue(Object base, int index, Object value) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
Convert an index into a corresponding string, and delegate.
setValue
in class javax.faces.el.PropertyResolver
base
- Base object into which to store a propertyindex
- Index to be storedvalue
- Value to be stored
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic boolean isReadOnly(Object base, int index) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
Convert an index into a corresponding string, and delegate.
isReadOnly
in class javax.faces.el.PropertyResolver
base
- Base object from which to check a propertyindex
- Index to be checked
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this contextpublic Class getType(Object base, int index) throws javax.faces.el.EvaluationException, javax.faces.el.PropertyNotFoundException
Convert an index into a corresponding string, and delegate.
getType
in class javax.faces.el.PropertyResolver
base
- Base object from which to return a property typeindex
- Index whose type is to be returned
javax.faces.el.EvaluationException
- if an evaluation error occurs
javax.faces.el.PropertyNotFoundException
- if there is no such named
object in this context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |