The Black Bean Source™
User Guide for EL-Functors 1.0.2

Tag Library

This project includes a tag library with tags and functions as defined below. The URI of this library is http://el-functors.sourceforge.net/jsp/util, and the el-functors JAR includes the META-INF/el.tld descriptor file. To make use of this library, the following can be placed at the top of the JSP page:

<%@ taglib uri="http://el-functors.sourceforge.net/jsp/util" prefix="el" %>

Tags

While not strictly needed for the EL-Resolver, a JSP utility define tag has been defined as follows:

<el:define var="x" value="${rtexpr}" />

This is similar to the JSTL core <c:set> tag, but allows the current value of the rtexpr (when the tag is executed) to be mapped to a variable with the given name, which makes it available for later deferred-value expressions to use. Some examples of where this is useful follow:

c:forEach var available to deferred-value expressions even when items not specified

<c:forEach var="it" begin="0" end="${fn:length(testlist) - 1}">
  <el:define var="idx" value="${it}" />
  <h:outputText value="#{idx}." />
  <h:inputText value="#{testlist[idx]}" size="20" />
</c:forEach>

c:forEach varStatus available to deferred-value expressions

<c:forEach items="#{testlist}" var="it" varStatus="is">
  <el:define var="index" value="${is.index}" />
  <h:outputText value="#{index}." />
  <h:inputText value="#{it}" size="20" />
</c:forEach>

As an import or alias mechanism for static class references from the functor EL-Resolver

<el:define var="List" value="${class.java.util.List}" />
<el:define var="Collections" value="${class.java.util.Collections}" />
...
<c:if test="${List.class.isInstance$[mybean]}">
    <c:forEach items="#{Collections.unmodifiableList$[mybean]}" var="it">
	...
    </c:forEach>
</c:if>

Note, in all the above cases, the standard JSTL tags are unable to provide the functionality.

Functions

There are also a set of taglib functions that provide access to the functors library independant of the use of the EL-Resolver. See the api-documentation for details.