2010-01-29 22:13:57 +00:00
|
|
|
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
|
|
|
|
|
|
<%@ page import="org.apache.commons.logging.Log" %>
|
|
|
|
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
2013-03-08 17:48:27 -05:00
|
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
|
2010-01-29 22:13:57 +00:00
|
|
|
<%@ page errorPage="/error.jsp"%>
|
|
|
|
<% /***********************************************
|
|
|
|
alphaIndex.jsp will just display the just the index, no entites.
|
|
|
|
|
|
|
|
request attributres:
|
|
|
|
'alpha' - set to currently displaying alpha, 'none' or 'all'
|
2010-10-06 20:02:20 +00:00
|
|
|
'controllerParam' - parameter for controller
|
2010-01-29 22:13:57 +00:00
|
|
|
'count' - count of entites in the index
|
|
|
|
'letters' - List of STrings, letters for index.
|
|
|
|
'servlet' - name of servlet to put in links.
|
|
|
|
|
|
|
|
put something like this in for debuggin: < % = MiscWebUtils.getReqInfo(request) % >
|
|
|
|
bdc34 2006-02-06
|
|
|
|
**********************************************/
|
2011-05-03 19:01:15 +00:00
|
|
|
|
2010-10-06 20:02:20 +00:00
|
|
|
%>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-10-06 20:02:20 +00:00
|
|
|
<c:if test="${ requestScope.showAlpha == 1 }">
|
2010-01-29 22:13:57 +00:00
|
|
|
<div class='alphaIndex'>
|
2010-10-06 20:02:20 +00:00
|
|
|
<c:forEach items='${requestScope.letters}' var='letter'>
|
|
|
|
<c:if test="${letter == requestScope.alpha}"> ${requestScope.alpha } </c:if>
|
|
|
|
<c:if test="${letter != requestScope.alpha}">
|
|
|
|
<c:url var="url" value=".${requestScope.servlet}">
|
|
|
|
<c:param name="alpha">${letter}</c:param>
|
|
|
|
</c:url>
|
|
|
|
<a href='<c:url value="${url}&${requestScope.controllerParam}"/>'>${letter} </a>
|
|
|
|
</c:if>
|
|
|
|
</c:forEach>
|
|
|
|
|
|
|
|
<% if( request.getAttribute("alpha") != null && ! "all".equalsIgnoreCase((String)request.getAttribute("alpha"))) { %>
|
|
|
|
<a href='<c:url value=".${requestScope.servlet}?&alpha=all&${requestScope.controllerParam}"/>'>all </a>
|
|
|
|
<c:if test='${not empty requestScope.count }'>
|
|
|
|
(${requestScope.count} that start with ${requestScope.alpha })
|
|
|
|
</c:if>
|
|
|
|
<% }else{ %>
|
|
|
|
(${requestScope.count})
|
|
|
|
<% } %>
|
2010-01-29 22:13:57 +00:00
|
|
|
</div>
|
|
|
|
</c:if>
|