Fixing page index on lucene based tabs. NIHVIVO-1143
Conflicts: webapp/src/edu/cornell/mannlib/vitro/webapp/controller/TabEntitiesController.java webapp/web/templates/entity/entityListForTabs.jsp
This commit is contained in:
parent
a83ea26a7b
commit
c3cb7b05a2
3 changed files with 144 additions and 107 deletions
|
@ -1,9 +1,9 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -181,6 +181,7 @@ public void doGet( HttpServletRequest req, HttpServletResponse response )
|
|||
+ tab.getTabtypeId() +" and link mode: " + tab.getEntityLinkMethod());
|
||||
}
|
||||
|
||||
|
||||
} catch (Throwable e) {
|
||||
req.setAttribute("javax.servlet.jsp.jspException",e);
|
||||
RequestDispatcher rd = req.getRequestDispatcher("/error.jsp");
|
||||
|
@ -370,7 +371,6 @@ public void doGet( HttpServletRequest req, HttpServletResponse response )
|
|||
rd.include(request, response);
|
||||
}
|
||||
|
||||
|
||||
private int getPage(VitroRequest request) {
|
||||
String p = request.getParameter("page") ;
|
||||
if( p == null )
|
||||
|
|
|
@ -55,9 +55,12 @@ public class LuceneIndexFactory {
|
|||
|
||||
/**
|
||||
* This method can be used to force the LuceneIndexFactory to return a new IndexSearcher.
|
||||
* This will force a re-opening of the search index.
|
||||
*
|
||||
* This could be useful if the index was rebult in a different directory on the file system.
|
||||
*/
|
||||
public synchronized void forceNewIndexSearcher(){
|
||||
log.debug("forcing the re-opening of the search index");
|
||||
searcher = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,40 @@
|
|||
</c:choose>
|
||||
</li>
|
||||
</c:forEach>
|
||||
<<<<<<< HEAD:webapp/web/templates/entity/entityListForTabs.jsp
|
||||
</ul>
|
||||
|
||||
=======
|
||||
</ul>
|
||||
|
||||
<%-- Show pages to select from --%>
|
||||
<%
|
||||
if( request.getAttribute("alpha") != null && ! "all".equalsIgnoreCase((String)request.getAttribute("alpha"))) {
|
||||
request.setAttribute("pageAlpha",request.getAttribute("alpha"));
|
||||
}else{
|
||||
request.setAttribute("pageAlpha",request.getAttribute("all"));
|
||||
}
|
||||
%>
|
||||
|
||||
<c:if test="${ requestScope.showPages }">
|
||||
<div class="searchpages minimumFontMain">
|
||||
Pages:
|
||||
<c:forEach items='${requestScope.pages }' var='page'>
|
||||
<c:url var='pageUrl' value=".${requestScope.servlet}">
|
||||
<c:param name ="primary">${requestScope.tabId}</c:param>
|
||||
<c:param name="page">${page.index}</c:param>
|
||||
<c:if test="${not empty requestScope.pageAlpha}">
|
||||
<c:param name="alpha">${requestScope.pageAlpha}</c:param>
|
||||
</c:if>
|
||||
</c:url>
|
||||
<c:if test="${ page.selected }">
|
||||
${page.text}
|
||||
</c:if>
|
||||
<c:if test="${ not page.selected }">
|
||||
<a class="minimumFontMain" href="${pageUrl}">${page.text} </a>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</div>
|
||||
</c:if>
|
||||
>>>>>>> c91e65e... Fixing page index on lucene based tabs. NIHVIVO-1143:webapp/web/templates/entity/entityListForTabs.jsp
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue