tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Billy Bacon <billy.ba...@thirty3.net>
Subject Re: Can EL take variables?
Date Thu, 11 Sep 2003 12:06:27 GMT
Yes, that's what I'm using but for some reason it's not working :-/

Here's one of my tags...

<c:if test="${requestScope[formName].map.function == 'edit'}">

- Billy -

On 9/11/03 4:04 AM, "Adam Hardy" <ahardy.struts@cyberspaceroad.com> wrote:

> What about ${requestScope[formName].map.whatever}
> 
> If not, post the tag you actually trying to use it with.
> 
> Adam
> 
> On 09/11/2003 04:30 AM Billy Bacon wrote:
>>> From the original Struts Tags I had the following in the parent JSP which
>> has 2 <%@ include%> statements...
>> <bean:define id="formName" value="kmoCreateComplexForm"/>
>> 
>> Now within my included pages I was able to reference that variable by
>> <%=formName%> and that worked just fine. Now I'm converting to JSTL and even
>> if I do a <c:set var="formName" value="kmoCreateComplexForm"/> it doesn't
>> allow the embedded pages to use the value.
>> 
>> I tried the requestScope[formName] idea that David suggested and that has
>> gotten me a little farther but I'm still getting an exception 'Cannot find
>> bean name' and it spits out the DynaActionForm with everything. It seems to
>> be finding the variable but I'm not sure what it's complaining about b/c JSP
>> errors are brutal sometimes to figure out. It doesn't give me a line number
>> or anything else to use for debugging...
>> 
>> 
>> On 9/10/03 11:08 AM, "Serge Knystautas" <sergek@lokitech.com> wrote:
>> 
>> 
>>> billy.bacon@thirty3.net wrote:
>>> 
>>>> Sure, I can expand on this. 'formName' is a variable in
>>>> the request which points to an object (in this case a
>>>> DynaActionForm object from Struts). So even though it
>>>> seems that the <c:set> tag is unnecessary I'm slightly
>>>> confused on how to expose it to the EL without it
>>>> treating it as a literal String such as "formName".
>>>> What I really need is the 'formName' variable to
>>>> translate to 'kmoCreateSimpleForm' so that when I use
>>>> it in the EL it will execute as
>>>> ${kmoCreateSimpleForm.map.whatever}
>>> 
>>> Yeah, but where in the request is it?  Put it this way, how would you
>>> get to it in a scriptlet?
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>> 
>> 


Mime
View raw message