Thanks for that.

While that didn't quite work, it did lead me on a path to something that
did. (I think I miscommunicated the Q a little)


One more thing, does this mean that I next "." within "[]"? So that:

<c:out value='${map[object.value]}'/>

Wouldn't work where map is a map and object is just a bean with getters for
value?






-----Original Message-----
From: Serge Knystautas [mailto:[EMAIL PROTECTED] 
Sent: Friday, 7 November 2003 10:27 AM
To: Tag Libraries Users List
Subject: Re: Usage problems with Nested EL Expressions


Chaimungkalanot, Mark wrote:
> Guys,
> 
> I need to evaluate an EL expression that contains variables of 
> variable names. From the archives, it seems the way to do this is by 
> accessing them through the implicit objects pageScope, requestScope 
> etc. 
> http://marc.theaimsgroup.com/?l=taglibs-user&m=105730468108706&w=2
> 
> However, I couldn't really get this to work. I want the value of:
> 
> <c:out value="${pageResults.sortHistory.roles.sortColumn}"/>
> 
> Which works fine, pageResults is in the request scope. So I try:
> 
> <c:set var='OBJ' value='roles'/>
> <c:out value='${requestScope["pageResults.sortHistory." + OBJ + 
> ".sortColumn"]}'/>
> 
> This gives an error "An exception occured trying to convert String 
> "pageResults.sortHistory." to type "java.lang.Double" (null)". So I 
> guess my syntax here is wrong? Strangely, even when I try:
> 
> <c:out 
> value='${requestScope["pageResults.sortHistory.roles.sortColumn"]}'/>

Do it in two stages:

<c:set var="sortColumn" 
value="${pageResults.sortHistory.roles.sortColumn}" />
<c:out value="${requestScope[sortColumn]}" />

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com p.
301.656.5501 e. [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**************   IMPORTANT MESSAGE  **************
This e-mail message is intended only for the addressee(s) and contains information 
which may be confidential. If you are not the intended recipient please advise the 
sender by return email, do not use or disclose the contents, and delete the message 
and any attachments from your system. Unless specifically indicated, this email does 
not constitute formal advice or commitment by the sender or the Commonwealth Bank of 
Australia (ABN 48 123 123 124) or its subsidiaries.
**************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to