But, regarding my Presentation Taglib, keep in mind that what I presented was a mere sneak preview. It's really premature and pointless to start discussing it's features (or lack thereof) on the basis of this.
I won't stop you if you do, but I won't bother either.
What's more serious, is that people are making claims about (supposedly) shortcomings of JSTL/EL, based on poor knowledge or understanding. Therefore, I'll provide some counterexamples below to disprove these claims:
<Kees J:>
the forEach tag can be useful. but when people start using it they will need the exact functions that are in the mmbase taglib -know the size of the list -know if the list is not empty -know if this is the first / last element
those simple functions are not provided by the jstl (maybe the flow taglibs are for that purpose).
Example 1: <mp:list path="news" var="newsitems"/>
Size of the list:
${newsitems.size}Note: the List interface does not provide a method getSize(), but the wrapper-class used by the mp:list tag does.
Test if the list is empty:
${empty newsitems}Note: empty is part of the EL syntax. It tests for null values and empty strings, collections or arrays.
The first/last element:
<c:forEach items="${newsitems}" var="newsitem" varStatus="status">
<c:if test="${status.first}">Print this in the first iteration only</c:if>
Print this in each iteration.
<c:if test="${status.last}">Print this in the last iteration only</c:if>
</c:forEach>
<Michiel M>
The other thing that I would very much miss is the <mm:content / escaper
functionallity, which perhaps would be a detail, but actually quit
essential, because generally it is wrong to just put your field to the page,
HTML-escaping a field value: <c:out escapeXML>${newsitem.body}</c:out>
Note: content/escaper functionality is easily implemented using tags that take the tag body as input. Chances are a taglib that suits your needs already exists.
A good place to shop around for taglibs is this:
http://wiki.java.net/bin/view/Projects/TagLibrariesFor a quick but comprehensive overview of EL/JSTL features I highly recomment this document:
http://www.jadecove.com/jstl-quick-reference.pdf
Regards, Rob van Maris
_______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
