Conversion of a String tag attribute value to Map
I would appreciate if Simon Brown or any other JSP expert can provide me with the best practices/patterns to solve the following problem.
I am developing a JSP custom tag that have an attribute called 'arguments' that may take any the following values:
1. A Map. In this case, a request-time expression would be provided. The user would provide either a scriptlet or an EL expression. EL expression support will be provided using a JSTL class.
2. A String which is the scoped variable name under which a Map object is found.
My problem is supporting the second use case, I tried to use a PropertyEditor class along with a Bean info class associated with the tag handler class so that given the String passed in the attribute 'arguments', I would try to search for a scope variable which name is that of the String in the tag attribute. This approach does not work as the PropertyEditor class, where the logic for getting the value of a scope variable should reside, does not know anything about any pagecontext through which access to scope variables are possible.
Any pattern to solve this problem?
Thank you
|