Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
|
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2006, 07:53 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting a number range from tag attribute group maikm XSLT 6 August 25th, 2008 04:54 PM
Attribute to Child element Conversion kudzuconf XSLT 6 July 13th, 2007 04:02 AM
Need tag value as attribute value sunrain XSLT 2 November 2nd, 2006 08:17 PM
xslt for each and attribute tag desse XSLT 1 May 24th, 2006 08:01 AM
Map string to cell property sunil menghani Excel VBA 3 April 17th, 2005 05:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.