jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: Help building my own tag on top of JSTL
Date Fri, 31 Jan 2003 01:11:55 GMT

While I don't have the answers for you, we have discussed making a TL
which contains things regularly asked for in the JSTL on this list.

Your tag sounds like it'd be a good addition. I would go with ifContains
as a name and model it on the <c:if> tag instead of the looping taglib.

Hen

On Thu, 30 Jan 2003, Heath Chiavettone wrote:

> We use JSTL extensively, and I have found what I consider a "hole" in its
> usability.  There is this nice <forEach> tag that takes a variety of
> collection types and allows you to iterate through them.  Tthere are many
> places in UI design where you want to output some HTML based on the presence
> of a specific value in a collection.  Essentially, it would be extremely
> help to have a <c:contains items="list" value="expression">body to output if
> value is in list</c:contains> tag rather than doing a <forEach> loop through
> the collection looking for this value.  Most of the Java collection classes
> already provide some sort of "locate this object in the collection", String
> provides one too.  And there are well establish algorithms for doing quick
> searches through Object arrays (i.e. Object[]).  Therefore, it makes sense
> to utilize the appropriate method for searching on the appropriate
> collection type.



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


Mime
View raw message