net.sourceforge.stripes.validation.expression
Class Jsp21ExpressionExecutor.StripesELResolver

java.lang.Object
  extended by javax.el.ELResolver
      extended by net.sourceforge.stripes.validation.expression.Jsp21ExpressionExecutor.StripesELResolver
Enclosing class:
Jsp21ExpressionExecutor

protected static class Jsp21ExpressionExecutor.StripesELResolver
extends ELResolver

Implementation of the EL interface to resolve variables. Resolves variables by checking two special names ("this" and "actionBean") and then falling back to retrieving property values from the ActionBean passed in to the constructor.

Since:
Stripes 1.5
Author:
Tim Fennell

Field Summary
 
Fields inherited from class javax.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Method Summary
 Class<?> getCommonPropertyType(ELContext elContext, Object o)
          Always returns Object.class.
 Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object o)
          Always returns null.
 Class<?> getType(ELContext ctx, Object base, Object prop)
          Does nothing.
 Object getValue(ELContext ctx, Object base, Object prop)
          Attempts to resolve the value as described in the class level javadoc.
 boolean isReadOnly(ELContext elContext, Object o, Object o1)
          Always returns true.
 void setValue(ELContext elContext, Object o, Object o1, Object o2)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValue

public Object getValue(ELContext ctx,
                       Object base,
                       Object prop)
Attempts to resolve the value as described in the class level javadoc.

Specified by:
getValue in class ELResolver
Parameters:
ctx - the ELContext for the expression
base - the object on which the property resides (null == root property)
prop - the name of the property being looked for
Returns:
the value of the property or null if one can't be found

getType

public Class<?> getType(ELContext ctx,
                        Object base,
                        Object prop)
Does nothing. Always returns Object.class.

Specified by:
getType in class ELResolver

setValue

public void setValue(ELContext elContext,
                     Object o,
                     Object o1,
                     Object o2)
              throws PropertyNotWritableException
Does nothing. Always throws PropertyNotWritableException.

Specified by:
setValue in class ELResolver
Throws:
PropertyNotWritableException

isReadOnly

public boolean isReadOnly(ELContext elContext,
                          Object o,
                          Object o1)
Always returns true.

Specified by:
isReadOnly in class ELResolver

getFeatureDescriptors

public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext,
                                                         Object o)
Always returns null.

Specified by:
getFeatureDescriptors in class ELResolver

getCommonPropertyType

public Class<?> getCommonPropertyType(ELContext elContext,
                                      Object o)
Always returns Object.class.

Specified by:
getCommonPropertyType in class ELResolver


? Copyright 2005-2006, Stripes Development Team.