tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Schwartz ...@arrayone.com>
Subject Re: Dynamic Evaluation
Date Thu, 28 Apr 2005 17:37:35 GMT
The myQuery param is actually a variable.
It would look like...
<c:set var = "myQuery" value = "${paramList}_Query" />

If the request param has a "_Query" suffix then i want to display the rows.

<c:if test = '${paramList eq myQuery}' >


Quoting Rahul P Akolkar <akolkar@us.ibm.com>:

>> On 4/28/05, David Schwartz <ds@arrayone.com> wrote:
>> > The names are dynamic as well & are not known until run-time.
>> >
>>
>> Sorry, I'm not sure what you mean here. In:
>> <c:if test = '${paramList eq "myQuery"}' >
>> "myQuery" is a string literal?
>>
>> > So, based on the type I would display the result.
>> > For a ResultSet I want to loop & display the rows.
>> >
>>
>> These references might help, please look at:
>> 1) JSTL sql tags [
>> http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/sql/tld-summary.html
>> ]
>> 2) The DBTags jakarta taglibs supported taglib [
>> http://jakarta.apache.org/taglibs/doc/dbtags-doc/intro.html ]
>>
>> -Rahul
>>
>> > Quoting Rahul P Akolkar <akolkar@us.ibm.com>:
>> >
>> > >> You don't have to loop to get at a request param, just use the param
>> > >> implicit object in your EL expression like so:
>> > >>
>> > >> ${param.myQuery}
>> > >>
>> > >> -Rahul
>> > >>
>> > >> On 4/28/05, David Schwartz <ds@arrayone.com> wrote:
>> > >> > Hi.
>> > >> > I'm trying to dynamically evaluate & loop through a request
>> parameter
>> > >> whose
>> > >> > value is a ResultSet.
>> > >> >
>> > >> > First, I'm looping the requestScope to find a param named
>> "myQuery".
>> > >> > Once found I want to output the rows of the query.
>> > >> >
>> > >> > <c:forEach items = '${requestScope}' var = "paramList" >
>> > >> >    <c:if test = '${paramList eq "myQuery"}' >
>> > >> >
>> > >> >        <%-- Here's where I'm stuck.
>> > >> >             How do I reference the value of myQuery, which is
a
>> > >> ResultSet?
>> > >> >        --%>
>> > >> >
>> > >> >        <c:forEach items = '${}' >
>> > >> >
>> > >> >    </c:if>
>> > >> > </c:forEach>
>> > >> >
>> > >> >
>> ---------------------------------------------------------------------
>> > >> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> > >> > For additional commands, e-mail:
>> taglibs-user-help@jakarta.apache.org
>> > >> >
>> > >> >
>> > >>
>> >
>> > David Schwartz
>> > Array Software Inc.
>> > http://www.arrayone.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>> >
>> >
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

---------------------------------------------------------------------
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