Double EL indirection in STL?

2002-03-17 Thread Lee Crawford

I'm trying to determine if there's a way to express the equivalent of:
  
  ${${x}}

in the STL EL. This yields an exception in the current beta release of the
STL. 

For instance, I'd like the following: 

c:set var=x value=y/
c:set var=y value=1234/
c:out value=${${x}}/

to yield: 

1234

obviously I can use nexted pageContext.findAttribute() calls to do this:

  c:set var=x value=y/
  c:set var=y value=1234/
  %= pageContext.findAttribute ((String) pageContext.findAttribute (x))
%

but I'd like to be able to do this from the EL. 

Cheers. 

--lee

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




Re: Double EL indirection in STL?

2002-03-17 Thread Shawn Bayern

On Sat, 16 Mar 2002, Lee Crawford wrote:

 I'm trying to determine if there's a way to express the equivalent of:
   
   ${${x}}
 
 in the STL EL. This yields an exception in the current beta release of the
 STL. 

Good question, Lee.  The EL doesn't support this, primarily (in my
opinion) because we didn't think that nonprogramming page authors would
need a feature like this.  Adding a feature to a language means that all
users -- not just the advanced ones -- will have to understand it to be
able to maintain pages written by other users.

Have you run into a practical situation where this kind of indirection is
absolutely necessary?

--
Shawn Bayern
Author, JSP Standard Tag Library  http://www.jstlbook.com
(coming this summer from Manning Publications)


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