%@ page
import="com.websina.bean.*,com.websina.util.*,com.websina.util.log.Log"
%>
Query Result
<%@ include file="_cache.jspf" %>
<%@ include file="_header.jspf" %>
<%
String parent = "queryresult.jsp";
Issue[] issueList = null;
// this query is set in the QueryServlet
com.websina.bean.Query query = (com.websina.bean.Query)session.getAttribute("query");
if (query == null) {
out.println("You have not made any queries, no query result exists!");
return;
}
int startIndex = 0;
String startStr = request.getParameter("startIndex");
if (startStr != null && startStr.trim().length() > 0) {
try {
startIndex = Integer.parseInt(startStr.trim());
} catch (Exception e) {
startIndex = 0;
}
issueList = (Issue[])session.getAttribute("issueList");
}
if (issueList == null) {
startIndex = 0;
issueList = query.list();
session.setAttribute("issueList", issueList);
String sortOrder = query.getSortOrder();
if (sortOrder != null) {
session.setAttribute("sort_field", sortOrder);
}
}
String[] showColumns = query.getShowColumns();
int showNumbers = query.getShowNumbers();
if (showNumbers == 0) {
showNumbers = 10;
}
%>
<%@ include file="_issuelist.jspf" %>