home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 July
/
CMCD0703.ISO
/
Software
/
Freeware
/
Programare
/
bugzero
/
jsp
/
queryresult.jsp
< prev
next >
Wrap
Text File
|
2003-06-05
|
2KB
|
65 lines
<%@ page
import="com.websina.bean.*,com.websina.util.*,com.websina.util.log.Log"
%>
<html>
<head><title>Query Result</title>
</head>
<body topmargin=0>
<%@ 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" %>
<script LANGUAGE="JavaScript" src="script/utils.js"></script>
<form name="save_query_form" action="<%=contextPath%>/servlet/query" onsubmit="trim(query_name); return(query_name.value.length>0);">
<input type="hidden" name="action" value="save_stored_query">
<%=label.get("save_query")%>
<%
String queryName = query.getQueryName();
if (queryName == null) queryName="";
%>
<input name=query_name size=24 maxlength=120 value="<%=queryName%>">
<input type=submit value="<%=label.get("go_button")%>">
and save it as default
<input type=checkbox name=default_query value="1">
</form>
</body></html>