tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Lauman <>
Subject JSTL/JSP/regexp Question
Date Wed, 01 Dec 2004 16:57:53 GMT
I'm using the following code to return results from drop down menues and 
user input text.
It works fine as long as the text is an exact case sensitive match to 
the data record.

What I want to do is evaluate the output the results of a user input 
search based on
'param.field' in figure 3.  i.e. If 'param.field' = 'name' use a regex 
or some other method
to return all records  that are a partial, case insensitive match to the 
input 'value' that
was submitted in the search request.  Is this possible to accomplish in 
JSTL?  If so I'd
like to know how.



JavaScript Funciton:

function MM_jumpMenu(targ,selObj,restore, field){ //v3.0
if (restore) selObj.selectedIndex=0;

Example 2:
Form to submit the input and the field 'name' to be found in the bean 
created array:

<form name="selectName" method="get" action="">
<input type="hidden" name="field" value="name">
<input type="text" name="value" size="16" maxlength="40" value="">
<input type="image" border="0" alt="Go!" src="images/go.gif" 
align="absmiddle" width="22" height="23"  
<nwc:filterOptions which="name"/>

Example 3:
Display the results.  JSTL gets the results form a Map/Array of the 
entire record set that the bean
created.  ( is the PK)

<c:forEach items="${restaurantInfo.restaurants}" var="restaurant">
<c:set target="${restaurant}" property="filterField" 
<c:if test="${restaurant.filterValue eq param.value}">
<td width="155" align="center">
<div align="left"><a 
value="${}"/>"><c:out value="${}"/></a></div>
<td width="130">
<div align="left"><c:out value="${restaurant.address1}"/></div>
<td width="79">
<div align="left"><c:out value="${}"/></div>
<td width="107">
<div align="right"><c:out value="${restaurant.reservationPhone}"/></div>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message