Dumped in Coldfusion

Wednesday, April 18, 2007

List lengths

If you have a list in JSP and want to know how long it is then you have to use a function from the JSTL. It isn't 'built-in'.
${fn:length(items)}

which means you need

<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>

elsewhere.

How annoying (and hard to find).

0 Comments:

Post a Comment

<< Home