Wednesday, May 12, 2010

JSTL: Find length of a collection

To get a length of a collection:
${fn:length(tvPackageGroup.addonOptions)}

Include <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> namespace.
http://stackoverflow.com/questions/851880/check-a-collection-size-with-jstl

Sorting a collection in JSTL

javadoc: http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/fn/tld-summary.html

No comments:

Post a Comment