tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mader, Steve" <>
Subject RE: Request:equalsParameter
Date Mon, 01 Oct 2001 12:48:49 GMT
I've had the same issue with a different taglib.  You can first place the
value into an attribute using the 'to' parameter of the <sql:getColumn> tag.
Then use an <%= %> scriptlet as the parameter to your <req:equalsParameter>


<req:equalsParameter name="id" match="<sql:getColumn colName="id"/>"

<sql:getColumn colName="id" 
               scope="request"/>    <%-- Default is the page %-->

<req:equalsParameter name="id" 

Yes I know this seems messy but I think it should work as long as the
rtexprvalue parameter for equalsParameter is turned on.

-----Original Message-----
From: Claus Jul Larsen []
Sent: Monday, October 01, 2001 7:18 AM
To: ''
Subject: SV: Request:equalsParameter

Yes, It seem to be the correct reply but the attribute must be the value
from a sql record:

<sql:statement id="stmt2" conn="conn1">
select id,sygdom from tblData5 where status=1
<sql:resultSet id="rset3">
<TR><TD VALIGN=TOP><IMG SRC="/images/rod_bullet.gif"></TD>
<TD VALIGN=TOP class=content>
<req:equalsParameter name="id" match="<sql:getColumn colName="id"/>"
<A HREF="index.jsp?id=<sql:getColumn colName="id"/>"><sql:getColumn
<req:equalsParameter name="id" match="<sql:getColumn colName="id"/>"
<B><sql:getColumn colName="sygdom"/></B>

I want to check the value of req.equalsparameter with the value of the
db-row's id - how? I cannot use tags into an attribute huh?

Claus from Denmark

-----Oprindelig meddelelse-----
Fra: Stephen Latter []
Sendt: 1. oktober 2001 13:16
Emne: re: Request:equalsParameter

> <req:equalsParameter name="id" match="<%= id %>" value="false">
> ....snip!...
> Doesn't work! 

Have you set the attribute for that tag-lib to allow run time expression
values so that the <%= id %> bit actually get converted?

In the TLD for the tag-lib you need to specify that a particular tag
attribute can accept expressions as well as straight values.

See for more
info. Look for <rtexprvalue>true|false|yes|no</rtexprvalue> 

Hope this helps and I haven't missed the point!


View raw message