You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by bi...@thirty3.net on 2003/09/10 18:37:30 UTC
Can EL take variables?
I'm hoping there is a way to do this but I haven't
figured it out yet...
I have a DynaActionForm but the form name is a variable
since the user could be coming from two different
sections and I'm trying to utilize one page to handle
either request...
So I have a <c:set> tag that defines the formName like
so...
<c:set var="formName" value="${formName}"/>
but when I try to use this in my conditional
statements, EL is treating formName as a string and not
a form....
<c:if test="${formName.map.xxxx}">
<%-- Whatever --%>
</c:if>
I'm getting a compilation error. 'formName' should be
translated to the actual form bean name such as
'kmoCreateComplexForm' or 'kmoCreateSimpleForm'
depending on where the user is coming from.
Is there a way to do this? What am I doing wrong?
- Billy -
Re: Can EL take variables?
Posted by Serge Knystautas <se...@lokitech.com>.
billy.bacon@thirty3.net wrote:
> I'm hoping there is a way to do this but I haven't
> figured it out yet...
>
> I have a DynaActionForm but the form name is a variable
> since the user could be coming from two different
> sections and I'm trying to utilize one page to handle
> either request...
>
> So I have a <c:set> tag that defines the formName like
> so...
>
> <c:set var="formName" value="${formName}"/>
Can you expand on this? The example provided does exactly nothing...
you assign the variable formName what's in variable formName. In Java,
you just wrote...
formName = formName;
> but when I try to use this in my conditional
> statements, EL is treating formName as a string and not
> a form....
This predicates on how you setup formName.
--
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com