📄 fastsearch.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import= "com.set.appframe.data.GenericValueObject" %>
<%@ page import= "com.set.utils.WebUtils" %>
<%
List dbList=(List)request.getAttribute("GVOLIST");
int totalPage = 0;
int pageNo = 0;
int totalRecords = 0;
String PagerString;
totalPage = ((Integer)request.getAttribute("TotalPage")).intValue();
totalRecords = ((Integer)request.getAttribute("TotalRecords")).intValue();
pageNo = ((Integer)request.getAttribute("PageNo")).intValue();
PagerString = (String) request.getAttribute("PagerString");
String username="";
if(request.getSession().getAttribute("USERNAME")!=null){
username=(String)request.getSession().getAttribute("USERNAME");
}
%>
<html>
<head>
<title>商品信息</title>
<LINK href="../css/set.css" type=text/css rel=stylesheet>
</head>
<script type="text/javascript">
function initSearchCriteria(){
<%
GenericValueObject formValues=(GenericValueObject)request.getAttribute("FormValues");
String model="";
if(!formValues.getItemString("MODEL").equals("")&&formValues.getItemString("MODEL")!=null){
model=formValues.getItemString("MODEL");
}
if (formValues!=null){ %>
document.all("MODEL").value="<%=model%>";
<%}%>
}
function onShopping(entity){
var username="<%=username%>";
if(username==""){
alert("请先登陆才能拥有属于您自己的购物车!");
}else{
window.open("/shopping/ShoppingAction.do?dispatch=create&productId="+entity, "newwindow", "height=400, width=500, toolbar =no, menubar=no scrollbars=yes resizable=no");
}
}
function goSearch()
{
document.all("dispatch").value="fastsearch";
document.all("frmPage").submit();
}
function onPreviousPage(){
document.all("ActionID").value="PreviousPage";
document.all("dispatch").value="fastsearch";
initSearchCriteria();
document.all("frmPage").submit();
}
function onFirstPage(){
document.all("ActionID").value="FirstPage";
document.all("dispatch").value="fastsearch";
initSearchCriteria();
document.all("frmPage").submit();
}
function onLastPage(){
document.all("ActionID").value="LastPage";
document.all("dispatch").value="fastsearch";
initSearchCriteria();
document.all("frmPage").submit();
}
function onNextPage(){
document.all("ActionID").value="NextPage";
document.all("dispatch").value="fastsearch";
initSearchCriteria();
document.all("frmPage").submit();
}
function onGoTo(pageindex)
{
document.all("ActionID").value="GoPageNo";
document.all("ctlGoPageNo").value=pageindex;
document.all("dispatch").value="fastsearch";
initSearchCriteria();
document.all("frmPage").submit();
}
function onGoPageNo() {
gOnlyNumeric(false,false);//call only input numeric value.
if (event.keyCode==13) {
if ((document.all("ctlGoPageNo").value <= 0) || ((document.all("ctlGoPageNo").value - document.all("ctlTotalPage").value) >0)
|| (document.all("ctlGoPageNo").value == document.all("ctlPageNo").value)){
alert("请输入正确的页数!");
return false;
}
document.all("ActionID").value="GoPageNo";document.all("ctlPageNo").value=document.all("ctlGoPageNo").value;
document.all("dispatch").value="fastsearch";
initSearchCriteria();
document.all("frmPage").submit();
}
}
</script>
<body text=#000000 leftMargin=0 background="image/background.gif"
topMargin=0 marginheight="0" marginwidth="0" onload="initSearchCriteria()">
<jsp:include page="../common/Top_head.jsp" flush="false"></jsp:include>
<form name="frmPage" action="/product/ProductAction.do" method="post">
<input name="ActionID" type="hidden" value="fastsearch">
<input type="hidden" name="dispatch" value="fastsearch">
<input type="hidden" name="ctlTotalPage" value=<%=totalPage %>>
<input type="hidden" name="ctlPageNo" value=<%=pageNo %>>
<input type="hidden" name="ctlGoPageNo">
<table width="100%">
<tr>
<td width="10%" align="center" valign="top">
<jsp:include page="../home/load.jsp"></jsp:include>
<jsp:include page="../home/search.jsp"></jsp:include>
</td>
<td valign=top align=center>
<table width="60%" height="74" border="0" cellpadding="0" cellspacing="0">
<tr >
<td width="20%"><div align="center"><strong>商品型号</strong></div></td>
<td width="20%"><div align="center"><strong>价格</strong></div></td>
<td width="20%"> </td>
</tr>
<%
if(null!=dbList)
{
Iterator it = dbList.iterator();
GenericValueObject gvo ;
for(int j=0;it.hasNext();j++)
{
gvo = (GenericValueObject)it.next();
%>
<tr>
<td align="center"><%=gvo.getItemString("MODEL") %></td>
<td align="center"><%=gvo.getItemString("PRICE") %></td>
<td align="center"><a href="javascript:onShopping('<%=gvo.getItemString("ID") %>')"><img src="../image/buy.gif" width="59" height="24" border=0></a></td>
</tr>
<tr><td colspan=3 height=2> </td></tr>
<%}
}
%>
</table>
<span style="font-size: 14px">
<center>
<p>
<%String str=WebUtils.getGooglePagerString(totalPage,pageNo);
out.println(str);
%>
</p>
</center>
</span>
</td>
</tr>
</table>
</form>
<jsp:include page="../home/bottom.jsp" flush="false"></jsp:include>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -