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]
