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.
ELResolvers are combined together using
CompositeELResolvers, 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
Constructors -
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 thepropertyargument.getFeatureDescriptors(ELContext context, Object base) If the base object is aDynaActionForm, returns anIteratorcontaining the set of keys available in theDynaActionForm.Class<?> If the base object is aDynaActionFormand the requested property name is {code map} then the typeMap.classwill be returned.If the base object is aDynaActionFormand the requested property name ismap, returns themapof theDynaActionForm.booleanisReadOnly(ELContext context, Object base, Object property) If the base is aDynaActionFormand 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.voidIf the base is aDynaActionFormand the requested property name ismap, this method always throwPropertyNotWritableException, because themapproperty is a ready-only property of theDynaActionFormclass.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 aDynaActionFormand the requested property name is {code map} then the typeMap.classwill be returned.If the base is a
DynaActionFormand the requested property name is {code map}, thepropertyResolvedproperty of theELContextobject must be set totrueby this resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.Assuming the base is a
DynaActionFormand the requested property name is {code map}, this method will always returnMap.class. This is because aDynaActionFormwith the property 'map' accepts only the objectMapas the value for this given key.- Specified by:
getTypein classELResolver- Parameters:
context- The context of this evaluation.base- The base to analyze. Only bases of typeDynaActionFormare handled by this resolver.property- The key to return the acceptable type for. Only keys with valuemapare handled by this resolver.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, then the most general acceptable type; otherwise undefined. - Throws:
NullPointerException- if context isnullELException- 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 aDynaActionFormand the requested property name ismap, returns themapof theDynaActionForm. Otherwisenullis returned.If the base is a
DynaActionFormand the requested property name ismap, thepropertyResolvedproperty of theELContextobject must be set totrueby this resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.Just as in
DynaActionForm.getMap(), just becausenullis returned doesn't mean there is no mapping for the key; it's also possible that the method explicitly returnsnull.- Specified by:
getValuein classELResolver- Parameters:
context- The context of this evaluation.base- The base to be analyzed. Only bases of typeDynaActionFormare handled by this resolver.property- The key whose associated value is to be returned. Only keys with valuemapare handled by this resolver.- Returns:
- If the
propertyResolvedproperty ofELContextwas 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 aDynaActionFormand the requested property name ismap, this method always throwPropertyNotWritableException, because themapproperty is a ready-only property of theDynaActionFormclass.- Specified by:
setValuein classELResolver- Parameters:
context- The context of this evaluation.base- The base to be modified. Only bases of typeDynaActionFormare handled by this resolver.property- The key with which the specified value is to be associated. Only keys with valuemapare handled by this resolver.value- The value to be associated with the specified key.- Throws:
NullPointerException- if context isnull.PropertyNotWritableException- is always throw, because themapproperty is a ready-only property of theDynaActionFormclass.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 aDynaActionFormand 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 themapproperty is a ready-only property of theDynaActionFormclass.If the base is a
DynaActionFormand the requested property name ismap, thepropertyResolvedproperty of theELContextobject must be set totrueby this resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
isReadOnlyin classELResolver- Parameters:
context- The context of this evaluation.base- The base to analyze. Only bases of typeDynaActionFormare handled by this resolver.property- The key to return the read-only status for. Only keys with valuemapare handled by this resolver.- Returns:
- If the
propertyResolvedproperty ofELContextwas set totrue, thentrueif calling thesetValuemethod will always fail orfalseif it is possible that such a call may succeed; otherwise undefined. - Throws:
NullPointerException- if context isnullELException- 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 anIteratorcontaining the set of keys available in theDynaActionForm. Otherwise, returnsnull.The
Iteratorreturned 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
toStringmethod on this key, ornullif the key isnull. - name - Same as displayName property.
- shortDescription - JavaDoc-Code of
DynaActionForm.getMap() - expert -
false - hidden -
false - preferred -
true
FeatureDescriptors:ELResolver.TYPE- The return value of calling thegetClass()method on this key, ornullif the key isnull.ELResolver.RESOLVABLE_AT_DESIGN_TIME-true
- Specified by:
getFeatureDescriptorsin classELResolver- Parameters:
context- The context of this evaluation.base- The object whose keys are to be iterated over. Only bases of typeDynaActionFormare handled by this resolver.- Returns:
- An
Iteratorcontaining zero or more (possibly infinitely more)FeatureDescriptorobjects, each representing a key in thisDynaActionForm, ornullif 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 thepropertyargument. 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:
getCommonPropertyTypein classELResolver- Parameters:
context- The context of this evaluation.base- The base to analyze. Only bases of typeDynaActionFormare handled by this resolver.- Returns:
nullif base is not aDynaActionForm; otherwiseObject.class.
-