This taglib lets you get size of the given list. JSP is rather limited in that respect strangely enough.


Name Required Default Type Description
id true   Object/String The result is stored in this variable.
list true   Object/String The list we want the size of.

ID-result variable contains: An integer.


This will result in that the variable "count" will contain the size of the childPages.

<%@ taglib uri="infoglue-common" prefix="common" %>
<%@ taglib uri="infoglue-content" prefix="content" %>
<%@ taglib uri="infoglue-structure" prefix="structure" %>
<%@ taglib uri="infoglue-page" prefix="page" %>
<%@ taglib uri="" prefix="c" %>
<page:pageContext id="pc"/>
<structure:childPages id="childPages" siteNodeId="${pc.siteNodeId}"/>
<common:size id="size" list="${childPages}"/>
Size: <c:out value="${size}"/><br/>

comments powered by Disqus