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

📄 post.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:10%;}.tCol2 { width:90%;}</style><script type="text/javascript">function displayFromObj(val) {    var fromOut = document.getElementById("form:fromOutput");    var fromIn = document.getElementById("form:fromInput");    var from = document.getElementById("form:from");    if (val == 1) {        fromOut.style.display = "block";        fromIn.style.display = "block";    } else {        fromOut.style.display = "none";        fromIn.style.display = "none";        from.value = "";    }}function displayMoreObj() {    var checkObj = document.getElementById("form:more");    var moreObj = document.getElementById("form:moreSelect");      if (checkObj.checked) {        moreObj.style.display = "";    } else {        moreObj.style.display = "none";    }}</script><f:view locale="#{localeBean.locale}"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title>            <h:outputText value="#{sayBBS.post_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 id="form" enctype="multipart/form-data">        <h:panelGrid border="0" width="100%" columns="1" cellpadding="3" cellspacing="3"            styleClass="bbs_table1 bgGray" headerClass="alignLeft height28 bgOrange">            <f:facet name="header">                <h:outputText value="#{sayBBS.post_title}"/>            </f:facet>            <h:messages globalOnly="true" showDetail="true" infoClass="infos" errorClass="errors" fatalClass="fatals"/>            <h:panelGrid border="1"                         columns="2"                         cellpadding="3"                         cellspacing="3"                        columnClasses="tCol1,tCol2"                        style="border:1px solid #FFFFFF"                        styleClass="table1 tableWH">                <h:outputText value="#{sayBBS.post_subject}:"/>                <h:panelGroup>                    <h:inputText id="title" required="true" size="40"                                  styleClass="marginRight"                                  value="#{bbs_post.title}">                        <f:validateLength minimum="2" maximum="64"/>                    </h:inputText>                    <h:selectOneMenu id="isFrom"                                      onchange="javascript:displayFromObj(this.value)"                                      styleClass="marginRight">                        <f:selectItem itemValue="0" itemLabel="#{sayBBS.post_selAuthor}"/>                        <f:selectItem itemValue="1" itemLabel="#{sayBBS.post_selQuote}"/>                    </h:selectOneMenu>                    <h:selectOneMenu id="type"                                      binding="#{bbs_post.uiType}"                                      value="#{bbs_post.type}"                                     styleClass="marginRight">                        <f:selectItems value="#{bbs_post.topicTypes}"/>                    </h:selectOneMenu>                    <h:message for="title" errorClass="errors"/>                    <h:message for="type" errorClass="errors"/>                    <h:outputText value="#{sayBBS.post_subjectDes}" styleClass="colorGray"/>                </h:panelGroup>                                <h:outputText id="fromOutput" value="#{sayBBS.post_from}:" style="display:none"/>                <h:panelGroup id="fromInput" style="display:none">                    <h:inputText id="from" value="#{bbs_post.from}" size="40">                        <f:validateLength minimum="2" maximum="32"/>                    </h:inputText>                    <h:outputText value=" #{sayBBS.post_fromDes}" styleClass="colorGray"/>                </h:panelGroup>                                <h:outputText value="#{sayBBS.post_forum}:"/>                <h:panelGroup>                    <h:selectOneMenu id="byForum" required="true"                          value="#{bbs_post.byForum}">                        <f:selectItem itemValue="" itemLabel="" itemDisabled="true"/>                        <f:selectItems value="#{bbs_post.forums}"/>                    </h:selectOneMenu>                    <h:message for="byForum" errorClass="errors"/>                    <h:outputText value=" #{sayBBS.post_forumDes}" styleClass="colorGray"/>                </h:panelGroup>		                <h:outputText value="#{sayBBS.post_content}:"/>                <h:panelGroup>                    <t:inputHtml id="content" required="true" style="width:100%;height:200px;" addKupuLogo="false"                         value="#{bbs_post.content}"/>                    <h:message for="content" errorClass="errors"/>                </h:panelGroup>                                <h:panelGroup>                    <h:selectBooleanCheckbox id="more" onclick="javascript:displayMoreObj()"/>                    <h:outputLabel for="more" value="#{sayBBS.post_more}"/>                </h:panelGroup>                                <f:facet name="footer">                    <h:panelGrid id="moreSelect"                      border="0"                     cellpadding="3"                      cellspacing="3"                      styleClass="table1 tableWH"                     style="display:none;"                     columnClasses="tCol1,tCol2"                     columns="2">                        <h:outputText value="#{sayBBS.post_bgsound}:" rendered="#{bbs_post.bgsound}"/>                        <h:panelGroup rendered="#{bbs_post.bgsound}">                            <h:selectOneMenu id="music" value="#{bbs_post.music}">                                <f:selectItem itemValue="-1" itemLabel=""/>                                <f:selectItems value="#{bbs_post.musics}"/>                            </h:selectOneMenu>                            <h:message for="music" errorClass="errors"/>                        </h:panelGroup>                        <h:outputText value="#{sayBBS.post_upload}:" rendered="#{bbs_post.upload}"/>                        <h:panelGroup rendered="#{bbs_post.upload}">                            <t:inputTextHelp size="20" styleClass="marginRight"                                 helpText="#{sayBBS.post_uploadDes}"                                value="#{bbs_post.myFileDes}">                                <f:validateLength minimum="2" maximum="16"/>                            </t:inputTextHelp>                            <t:inputFileUpload styleClass="marginRight" size="30" style="height:22px;" value="#{bbs_post.myFile}"/>                            <h:outputText value="#{sayBBS.post_uploadDes2} #{bbs_post.suffixAllow}" styleClass="colorGray"/>                        </h:panelGroup>                    </h:panelGrid>                </f:facet>                                <h:panelGroup>                    <h:commandButton value="#{sayBBS.post_post}" action="#{bbs_post.sendTopic}"/>                    <h:commandButton value="#{sayBBS.post_cancel}" immediate="true" style="margin-left:5px;"/>                </h:panelGroup>            </h:panelGrid>        </h:panelGrid>    </h:form>    <%@ include file="/common/footer.jsp" %>    </body></html></f:view>

⌨️ 快捷键说明

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