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 shanmugampl <sh...@india.adventnet.com> on 2002/09/27 14:24:09 UTC

Issue in giving runtime expression for custom tag attributes

Hi All,

        I am developing some custom tags for my application. For one of 
my tag attributes i have the rtexprvalue set to true. The following 
scenario does not work

Usage:
<%
String userName = "Shan"
%>
<my:MyTag name="<%=userName%>_guest"/>

When i see the generated code, the value for userName is not replaced, 
and the whole expression is considered as a String and passed to the 
method.
i.e the setName method is called as setName("<%=userName%>_guest");

but the result i expected was
setName(userName+"_guest");

The same thing works fine if i give it as

<my:MyTag name="<%=userName%>"/>

and the generated result was setName(userName);

Is this a bug  or the expected functionality because for other html tags 
such as input i can specify it as

<input value="text<%=userName%>"/>

Thanks
Shanmugam.PL


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>