<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%@ page import="java.util.*"%> <%@ page import="java.net.URLEncoder"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.*" %> <%@ page import="org.apache.commons.lang.StringEscapeUtils" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ page errorPage="/error.jsp"%> <% /*********************************************** Display Paged Search Results request.attributes: List object with the name "beans" request.parameters: None yet. ********************************************* */ if (request.getAttribute("beans") == null) { String e = "searchBaisc.jsp expects that request attribute " + "'beans' be set to a List of Individuals to display."; throw new JspException(e); } Portal portal = (Portal) request.getAttribute("portalBean"); String portalParm = "&home=" + portal.getPortalId(); %>

Search Results for '' limited to type '${requestScope.classgroupName}' limited to type '${requestScope.typeName}'

<% if( request.getAttribute("classgroups") != null ){ %>
Show only results of this type: <% List groups = (List) request.getAttribute("classgroups"); Iterator it = groups.iterator(); while(it.hasNext()){ VClassGroup grp = (VClassGroup)it.next(); out.println(""); out.println(StringEscapeUtils.escapeHtml(grp.getPublicName())); out.println(""); } out.println("
"); } if( request.getAttribute("types") != null ){ %>
Show only results of this sub-type: <% List types = (List) request.getAttribute("types"); Iterator it = types.iterator(); while(it.hasNext()){ VClass type = (VClass)it.next(); out.println(""); out.println(StringEscapeUtils.escapeHtml(type.getName())); out.println(""); } out.println("
"); } /* generate search result list */ List beans = (List) request.getAttribute("beans"); Iterator it = beans.iterator(); out.println(""); /* generate pageing list */ int startIndex = (Integer)request.getAttribute("startIndex"); int hitsPerPage = (Integer)request.getAttribute("hitsPerPage"); int hitsLength = (Integer)request.getAttribute("hitsLength"); int maxHitSize = (Integer)request.getAttribute("maxHitSize"); String basePageUrl = request.getContextPath() + "/search?querytext=" +URLEncoder.encode(request.getParameter("querytext"),"UTF-8") + request.getAttribute("refinement"); out.println("
"); out.println("Pages:"); for(int i=0; i= (startIndex) && i < (startIndex+ hitsPerPage)?"class='currentPage'":""; out.println("" + ((i/hitsPerPage) + 1) + ""); }else{ out.println("more..."); break; } } out.println("
"); %>