2 Replies Latest reply on Feb 8, 2008 9:57 AM by mcrandall

    JSP Tag files

    mcrandall

      Can you use JSP tag files with a facelet? We have some tag files that we were using with our JSP files.

      <%@ tag trimDirectiveWhitespaces="true"%>
      <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
      
      <%@ attribute name="var" required="true" rtexprvalue="false" %>
      <%@ variable name-from-attribute="var" alias="tableVar" scope="AT_BEGIN" %>
      <%@ attribute name="items" required="true" type="java.util.Collection" %>
      <%@ attribute name="style" %>
      
      
      <c:if test="${empty style}">
       <c:set var="style" value="data"/>
      </c:if>
      
      <table class="${style}">
       <c:set var="row" value="0" scope="request"/>
       <c:set var="headings">
       <jsp:doBody/>
       </c:set>
      
       <c:if test="${headingCount > 0}">
       <tr>
       ${headings}
       </tr>
       </c:if>
      
       <c:forEach var="tableVar" items="${items}">
       <c:set var="row" value="${row + 1}" scope="request"/>
      
       <c:if test="${row > 0}">
       <c:set var="style" value="odd"/>
       <c:if test="${row % 2 == 0}">
       <c:set var="style" value="even"/>
       </c:if>
       <tr class="${pageScope.style}">
       <jsp:doBody/>
       </tr>
       </c:if>
       </c:forEach>
      </table>