jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Brennan.O'S...@alltel.com>
Subject RE: general tag attribute question
Date Fri, 14 Jun 2002 20:17:11 GMT
Yes, that's exactly what I'm doing now but I thought the other way had
worked before.  I was just wondering if the way tag attributes are
evaluated has changed or if I was just imagining that static text along
with an expression used to work!

Now that I've read the second response, I guess it was just my
imagination...

Thanks for the info.
Brennan

-----Original Message-----
From: Jones, Marty B. [mailto:marty_jones@dailyaccess.com]
Sent: Friday, June 14, 2002 3:12 PM
To: Tag Libraries Developers List
Subject: RE: general tag attribute question


I had a similiar problem with mixing static text with dynamic text in a
tag
attribute.  I could get the dynamic text to work only if it was the only
thing in the expression.  I ended up doing something like the following:

<% 
int index = 0;
String attrCmd = "selectRow(" + index + ")";
 %>

<tag:row onClick="<%=attrCmd%>"/>

I am not sure if it is the most elegant solution buy hey it works.

> -----Original Message-----
> From:	Brennan.O'Shea@alltel.com [SMTP:Brennan.O'Shea@alltel.com]
> Sent:	Friday, June 14, 2002 3:07 PM
> To:	taglibs-dev@jakarta.apache.org
> Subject:	general tag attribute question
> 
> I have a general tag question that I have been unable to find the
answer
> to.
> 
> Is the following legal:
> 
> 	<% int index = 0; %>
> 
> 	<tag:row onClick="selectRow(<%=index%>)"/>
> 
> if the onClick attribute has 
> 
> 	<rtexprvalue>true</rtexprvalue>
> 
> in the TLD?
> 
> I cannot get it to work with Tomcat version 4.0.1 but I'm almost sure
> I've mixed static text with an expression inside of a tag attribute
> before.  
> 
> 
> I would hope that the onClick attribute would become:
> 
> 	onClick="selectRow(0)"
> 
> but it does not.  It instead stays exactly like it is in the JSP:
> onClick="selectRow(<%=index%>)"
> 
> The way I'm getting around it is to create a String containing the
> entire bit that is then output as an expression inside the tag
> attribute.  Is it possible to mix static text with an expression
inside
> a JSP tag attribute -- and have the expression evaluated?  I thought
I'd
> done this successfully before, but I could be wrong.
> 
> Thanks in advance,
> Brennan
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:taglibs-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message