cbarnes wrote:
>>The Object returned by getAttribute() is either a String or the special
>>Object instance named REQUEST_TIME_VALUE, to tell the TEI that the
>>attribute is defined by a request-time attribute expression and can
>>not be evaluated at translation time. So if you specify a list of names
>>as a tag attribute, you have to use getAttributeString(), or cast the
>>returned value from getAttribute() to a String, and then parse the
>>list yourself. Something like this:
>
>
> In my JSP, I would like to be able to specify this list of names using
> something lile:
>
> <mytag attributenames="<%= name1 %>, <%= name2 %>, <%= name3 %>"/>
>
> However, this and variations of it that I have tried don't work.
> I know I can use a block of Java code to create this string, but ideally I
> would like to do it using just JSP.
> Is this possible?

The syntax you use is not valid; you can only have one request-time
attribute expression in an attribute value. This would work, though:

   <mytag attributenames='<%= name1 + "," + name2 + "," + name3 %>"/>

I may be wrong, but it seems like you may be trying to save tag handler
coding time at the expense of the usability of your tag library. Do
you really need to use one attribute for this? It would be easier to
use if you defined separate attributes for each value.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to