⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchresult.jsp

📁 tbuy1.1.5是在netbeans环境下用JSF技术编写的一个论坛tbuy1.1.5是在netbeans环境下用JSF技术编写的一个论坛
💻 JSP
字号:
<%@page contentType="text/html" pageEncoding="UTF-8"%><%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%><%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%><%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"><style type="text/css">.tCol1 {    width: 30px;    height:40px;    text-align: center;}</style><f:view locale="#{localeBean.locale}"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title><h:outputText value="#{sayBBS.forum_title}"/></title>        <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/common/css/style.css"/>        <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/bbs/css/style.css"/>    </head>    <body>    <%@ include file="/common/header.jsp" %>    <%@ include file="/common/top.jsp"%>    <h:form>        <h:panelGrid rendered="#{bbs_searchResult.searchabled}" border="0" cellpadding="3" cellspacing="3"                      styleClass="bgGray tableWH"                     headerClass="bgOrange colorGreen height22 alignLeft">            <f:facet name="header">                <h:outputText value="高级搜索"/>            </f:facet>            <h:panelGrid border="0" width="100%" columns="1"                         cellpadding="3" cellspacing="3"                         styleClass="table1 bgWhite">                <h:panelGrid border="0" columns="2">                    <h:inputText id="keyword" value="#{bbs_searchResult.searchModel.keyword}" size="40" required="true">                        <f:validateLength minimum="2" maximum="32"/>                    </h:inputText>                    <h:commandButton value="搜索" action="#{bbs_searchResult.search}"/>                    <h:message for="keyword" styleClass="errors"/>                </h:panelGrid>                <h:panelGroup>                    <h:selectBooleanCheckbox id="byTitle" value="#{bbs_searchResult.searchModel.byTitle}"/>                    <h:outputLabel for="byTitle" value="标题" style="margin-right:20px;"/>                    <h:selectBooleanCheckbox id="byContent" value="#{bbs_searchResult.searchModel.byContent}"/>                    <h:outputLabel for="byContent" value="内容" style="margin-right:20px;"/>                    <h:selectBooleanCheckbox id="byUser" value="#{bbs_searchResult.searchModel.byUserid}"/>                    <h:outputLabel for="byUser" value="作者ID" style="margin-right:20px;"/>                </h:panelGroup>            </h:panelGrid>        </h:panelGrid>    </h:form>    <h:form styleClass="marginTop">        <!-- --------------------------------------------------search result -->        <h:panelGrid border="0" cellpadding="3" cellspacing="3"                      styleClass="bgGray tableWH"                     headerClass="alignLeft bgOther2 height22 colorGreen">           <f:facet name="header">                <h:outputText value="搜索结果"/>           </f:facet>           <h:messages globalOnly="true" showDetail="true" infoClass="infos" errorClass="errors" fatalClass="fatals"/>            <t:dataTable id="result" border="0" rows="#{bbs_searchResult.pageSize}" rowIndexVar="No"                         value="#{bbs_searchResult.result}" var="topic"                         binding="#{bbs_searchResult.uiResult}"                           cellpadding="2" cellspacing="0"                         styleClass="bbs_table1 bgWhite tableWH"                         columnClasses="borderB">                <h:column>                    <h:panelGrid border="0" width="100%" columns="2"                                 columnClasses="tCol1 bgOther2,,">                        <h:outputText value="#{No + 1}" styleClass="alignCenter"/>                        <h:panelGrid border="0" width="100%" columns="1">                            <h:outputLink value="#{facesContext.externalContext.requestContextPath}/bbs/topic/#{topic.num}.faces">                                <h:outputText value="#{topic.title}" escape="false" styleClass="fontBold"/>                            </h:outputLink>                            <h:outputText value="#{topic.content}" escape="false" style="font-size:12px;"/>                            <h:panelGroup styleClass="colorGray" style="font-size:12px;">                                <h:outputText value="#{topic.byUser}" styleClass="marginRight"/>                                <h:outputText value="#{topic.date}" styleClass="marginRight">                                    <f:convertDateTime pattern="yyyy-MM-dd HH:mm"/>                                </h:outputText>                                <h:outputText value="[回复:#{topic.totalReply}]" styleClass="marginRight"/>                                <h:outputText value="[浏览:#{topic.totalView}]" styleClass="marginRight"/>                            </h:panelGroup>                        </h:panelGrid>                    </h:panelGrid>                </h:column>            </t:dataTable>            <h:panelGrid border="0" cellpadding="0" cellspacing="0" styleClass="alignRight tableWH">                <t:dataScroller id="scroller"                        for="result"                         fastStep="5"                         paginator="true"                        paginatorMaxPages="10"                        paginatorActiveColumnClass="scrollerPACC"                        renderFacetsIfSinglePage="false">                        <f:facet name="first">                            <t:graphicImage url="/common/images/scroller/arrow-first.gif"/>                        </f:facet>                        <f:facet name="last">                            <t:graphicImage url="/common/images/scroller/arrow-last.gif"/>                        </f:facet>                        <f:facet name="previous">                            <t:graphicImage url="/common/images/scroller/arrow-previous.gif"/>                        </f:facet>                        <f:facet name="next">                            <t:graphicImage url="/common/images/scroller/arrow-next.gif"/>                        </f:facet>                        <f:facet name="fastforward">                            <t:graphicImage url="/common/images/scroller/arrow-ff.gif"/>                        </f:facet>                        <f:facet name="fastrewind">                            <t:graphicImage url="/common/images/scroller/arrow-fr.gif"/>                        </f:facet>                </t:dataScroller>            </h:panelGrid>        </h:panelGrid>        <t:saveState value="#{bbs_searchResult.searchModel}"/>    </h:form>    <%@ include file="/bbs/include/jump.jsp"%>    <%@ include file="/common/footer.jsp" %>    </body></html></f:view>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -