cvs commit: spice/sandbox/repository/componenthaus/src/webapp/WEB-INF/jsp/usecases/searchcomponents paging.jsp searchResults.jsp
Mike Hogan <[email protected]>
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
hogie 03/10/28 11:36:06
Modified: sandbox/repository/componenthaus/src/webapp/WEB-INF/jsp/usecases/searchcomponents
paging.jsp searchResults.jsp
Log:
Some test cases for search use case. Incomplete.
Revision Changes Path
1.3 +5 -5 spice/sandbox/repository/componenthaus/src/webapp/WEB-INF/jsp/usecases/searchcomponents/paging.jsp
Index: paging.jsp
===================================================================
RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/webapp/WEB-INF/jsp/usecases/searchcomponents/paging.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- paging.jsp 5 Oct 2003 14:53:43 -0000 1.2
+++ paging.jsp 28 Oct 2003 19:36:06 -0000 1.3
@@ -2,16 +2,16 @@
<span class="description_text">
<c:forEach var="page" items="${pages}">
<c:choose>
- <c:when test='${page.id == currentPage.id}'>
- <c:out value="${page.id}"/>
+ <c:when test='${page.pageIndex == currentPage.pageIndex}'>
+ <c:out value="${page.pageIndex}"/>
</c:when>
<c:otherwise>
<c:url var="url" value="searchComponents.action" >
<c:param name="query" value="${query}" />
- <c:param name="beginIndex" value="${page.beginIndex}" />
- <c:param name="endIndex" value="${page.endIndex}" />
+ <c:param name="beginIndex" value="${page.hitBeginIndex}" />
+ <c:param name="endIndex" value="${page.hitEndIndex}" />
</c:url>
- <a href="<c:out value="${url}"/>"><c:out value="${page.id}"/></a>
+ <a href="<c:out value="${url}"/>"><c:out value="${page.pageIndex}"/></a>
</c:otherwise>
</c:choose>
</c:forEach>
1.3 +19 -12 spice/sandbox/repository/componenthaus/src/webapp/WEB-INF/jsp/usecases/searchcomponents/searchResults.jsp
Index: searchResults.jsp
===================================================================
RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/webapp/WEB-INF/jsp/usecases/searchcomponents/searchResults.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- searchResults.jsp 5 Oct 2003 12:26:41 -0000 1.2
+++ searchResults.jsp 28 Oct 2003 19:36:06 -0000 1.3
@@ -1,17 +1,24 @@
<%@ include file="../../includes.jsp" %>
<span class="description_text">
-Results <c:out value="${beginIndex}"/> to <c:out value="${endIndex}"/> of <c:out value="${totalMatches}"/></br>
+<c:choose>
+ <c:when test='${totalMatches == 0}'>
+ No matches found.
+ </c:when>
+ <c:otherwise>
+ Results <c:out value="${beginIndex}"/> to <c:out value="${endIndex}"/> of <c:out value="${totalMatches}"/></br>
-<table border="0">
- <c:forEach items="${results}" var="result">
- <c:url var="viewDetailsUrl" value="componentDetails.action" >
- <c:param name="id" value="${result.id}" />
- </c:url>
- <tr>
- <td><a href="<c:out value="${viewDetailsUrl}"/>" class="description_text"><c:out value="${result.name}"/></a></td>
- <td class="description_text"><c:out value="${result.oneLineDescription}"/></td>
- </tr>
- </c:forEach>
-</table>
+ <table border="0">
+ <c:forEach items="${results}" var="result">
+ <c:url var="viewDetailsUrl" value="componentDetails.action" >
+ <c:param name="id" value="${result.id}" />
+ </c:url>
+ <tr>
+ <td><a href="<c:out value="${viewDetailsUrl}"/>" class="description_text"><c:out value="${result.name}"/></a></td>
+ <td class="description_text"><c:out value="${result.oneLineDescription}"/></td>
+ </tr>
+ </c:forEach>
+ </table>
+ </c:otherwise>
+</c:choose>
</span>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/