Class DynaActionFormELResolver
DynaActionForm
.
This resolver handles base objects of type DynaActionForm
with requested property name {code map}.
This resolver is in read-only mode, which means that isReadOnly(jakarta.el.ELContext, java.lang.Object, java.lang.Object)
will always return true
and setValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)
will always throw
PropertyNotWritableException
.
ELResolver
s are combined together using
CompositeELResolver
s, to define rich semantics for evaluating
an expression. See the JavaDocs for ELResolver
for details.
- Since:
- Struts 1.4.1
- See Also:
-
Field Summary
Fields inherited from class jakarta.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass
<?> getCommonPropertyType
(ELContext context, Object base) If the base object is aDynaActionForm
, returns the most general type that this resolver accepts for theproperty
argument.getFeatureDescriptors
(ELContext context, Object base) If the base object is aDynaActionForm
, returns anIterator
containing the set of keys available in theDynaActionForm
.Class
<?> If the base object is aDynaActionForm
and the requested property name is {code map} then the typeMap.class
will be returned.If the base object is aDynaActionForm
and the requested property name ismap
, returns themap
of theDynaActionForm
.boolean
isReadOnly
(ELContext context, Object base, Object property) If the base is aDynaActionForm
and the requested property name ismap
, returns whether a call tosetValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)
will always fail.void
If the base is aDynaActionForm
and the requested property name ismap
, this method always throwPropertyNotWritableException
, because themap
property is a ready-only property of theDynaActionForm
class.Methods inherited from class jakarta.el.ELResolver
convertToType, invoke
-
Constructor Details
-
DynaActionFormELResolver
public DynaActionFormELResolver()Creates a new readDynaActionFormELResolver
.
-
-
Method Details
-
getType
If the base object is aDynaActionForm
and the requested property name is {code map} then the typeMap.class
will be returned.If the base is a
DynaActionForm
and the requested property name is {code map}, thepropertyResolved
property of theELContext
object must be set totrue
by this resolver, before returning. If this property is nottrue
after this method is called, the caller should ignore the return value.Assuming the base is a
DynaActionForm
and the requested property name is {code map}, this method will always returnMap.class
. This is because aDynaActionForm
with the property 'map' accepts only the objectMap
as the value for this given key.- Specified by:
getType
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base to analyze. Only bases of typeDynaActionForm
are handled by this resolver.property
- The key to return the acceptable type for. Only keys with valuemap
are handled by this resolver.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, then the most general acceptable type; otherwise undefined. - Throws:
NullPointerException
- if context isnull
ELException
- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
-
getValue
If the base object is aDynaActionForm
and the requested property name ismap
, returns themap
of theDynaActionForm
. Otherwisenull
is returned.If the base is a
DynaActionForm
and the requested property name ismap
, thepropertyResolved
property of theELContext
object must be set totrue
by this resolver, before returning. If this property is nottrue
after this method is called, the caller should ignore the return value.Just as in
DynaActionForm.getMap()
, just becausenull
is returned doesn't mean there is no mapping for the key; it's also possible that the method explicitly returnsnull
.- Specified by:
getValue
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base to be analyzed. Only bases of typeDynaActionForm
are handled by this resolver.property
- The key whose associated value is to be returned. Only keys with valuemap
are handled by this resolver.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, then the value associated with the given key. - Throws:
NullPointerException
- if context isnull
.ELException
- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
-
setValue
If the base is aDynaActionForm
and the requested property name ismap
, this method always throwPropertyNotWritableException
, because themap
property is a ready-only property of theDynaActionForm
class.- Specified by:
setValue
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base to be modified. Only bases of typeDynaActionForm
are handled by this resolver.property
- The key with which the specified value is to be associated. Only keys with valuemap
are handled by this resolver.value
- The value to be associated with the specified key.- Throws:
NullPointerException
- if context isnull
.PropertyNotWritableException
- is always throw, because themap
property is a ready-only property of theDynaActionForm
class.ELException
- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
-
isReadOnly
If the base is aDynaActionForm
and the requested property name ismap
, returns whether a call tosetValue(jakarta.el.ELContext, java.lang.Object, java.lang.Object, java.lang.Object)
will always fail. This method always returnstrue
, because themap
property is a ready-only property of theDynaActionForm
class.If the base is a
DynaActionForm
and the requested property name ismap
, thepropertyResolved
property of theELContext
object must be set totrue
by this resolver, before returning. If this property is nottrue
after this method is called, the caller should ignore the return value.- Specified by:
isReadOnly
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base to analyze. Only bases of typeDynaActionForm
are handled by this resolver.property
- The key to return the read-only status for. Only keys with valuemap
are handled by this resolver.- Returns:
- If the
propertyResolved
property ofELContext
was set totrue
, thentrue
if calling thesetValue
method will always fail orfalse
if it is possible that such a call may succeed; otherwise undefined. - Throws:
NullPointerException
- if context isnull
ELException
- if an exception was thrown while performing the property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
-
getFeatureDescriptors
If the base object is aDynaActionForm
, returns anIterator
containing the set of keys available in theDynaActionForm
. Otherwise, returnsnull
.The
Iterator
returned must contain zero or more instances ofFeatureDescriptor
. Each info object contains information about a key in the Map, and is initialized as follows:- displayName - The return value of calling the
toString
method on this key, ornull
if the key isnull
. - name - Same as displayName property.
- shortDescription - JavaDoc-Code of
DynaActionForm.getMap()
- expert -
false
- hidden -
false
- preferred -
true
FeatureDescriptor
s:ELResolver.TYPE
- The return value of calling thegetClass()
method on this key, ornull
if the key isnull
.ELResolver.RESOLVABLE_AT_DESIGN_TIME
-true
- Specified by:
getFeatureDescriptors
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The object whose keys are to be iterated over. Only bases of typeDynaActionForm
are handled by this resolver.- Returns:
- An
Iterator
containing zero or more (possibly infinitely more)FeatureDescriptor
objects, each representing a key in thisDynaActionForm
, ornull
if the base object is not aDynaActionForm
.
- displayName - The return value of calling the
-
getCommonPropertyType
If the base object is aDynaActionForm
, returns the most general type that this resolver accepts for theproperty
argument. Otherwise, returnsnull
.Assuming the base is a
DynaActionForm
, this method will always returnObject.class
. This is because any object is accepted as a key and is coerced into a string.- Specified by:
getCommonPropertyType
in classELResolver
- Parameters:
context
- The context of this evaluation.base
- The base to analyze. Only bases of typeDynaActionForm
are handled by this resolver.- Returns:
null
if base is not aDynaActionForm
; otherwiseObject.class
.
-