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

📄 countsave.jsp

📁 一个简单的数据连接例子
💻 JSP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=GBK"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<f:view>
  <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
      <link href="./css/styles.css" rel="stylesheet" type="text/css"/>
      <title>入库信息</title>
    </head>
    <body background="image/background.gif"><h:form>
        <h2 align="center">
          <font face="华文新魏" color="#5a9400">入库信息表</font>
        </h2>
        
        <table cellspacing="0" style="font-size: 9pt" cellpadding="0" border="1"
               width="100%">
          <tr>
            <td width="10%">COUNTSAVE_ID</td>
            <td  width="40%">
              <h:inputText size="20" value="#{countSaveInfo.countSave_ID}"/>
            </td>
            <td width="10%">MERCHCODE</td>
            <td width="40%">
              <h:inputText size="20" value="#{countSaveInfo.merchCode}"/>
            </td>
           
          </tr>
          <tr>
           <td width="10%">MERCHNAME</td>
            <td width="40%">
              <h:inputText size="20" value="#{countSaveInfo.merchName}"/>
            </td>
            <td width="10%">UNIT</td>
            <td width="40%">
              <h:inputText size="20" value="#{countSaveInfo.unit}"/>
            </td>
          </tr>
          <tr>
            <td width="10%">COUNT</td>
            <td width="40%">
              <h:inputText size="20" value="#{countSaveInfo.count}"/>
            </td>
          </tr>
          <tr>
            <td align="right" colspan="6">
              <h:commandButton action="#{countSaveController.queryItem}"
                               value="查询"/>
              <h:commandButton action="#{countSaveController.insertItem}"
                               value="保存"/>
              <h:commandButton type="#{countSaveController.Reset}" value="清空"/>
            </td>
          </tr>
        </table>
        <div style="overflow:auto; height:300px;font-size: 9pt">
          <h:dataTable value="#{countSaveController.model}" var="lairage"
                       styleClass="customers" headerClass="customersHeader"
                       rowClasses="oddRows,evenRows"
                       columnClasses="customersCol" width="100%">
            <!--oracle-jdev-comment:Faces.RI.DT.Class.Key:javax.faces.model.DataModel-->
            <h:column>
              <f:facet name="header">
                <h:outputText value="选择"/>
              </f:facet>
             <f:verbatim>
                <input type="checkbox" name="aa" value="1" />
              </f:verbatim>
             
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="COUNTSAVE_ID"/>
              </f:facet>
              <h:outputText value="#{lairage.countSave_ID}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="MERCHCODE"/>
              </f:facet>
              <h:outputText value="#{lairage.merchCode}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:panelGroup>
                  <h:outputText value="MERCHNAME"/>
                </h:panelGroup>
              </f:facet>
              <h:outputText value="#{lairage.merchName}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="UNIT"/>
              </f:facet>
              <h:outputText value="#{lairage.unit}"/>
            </h:column>
            <h:column>
              <f:facet name="header">
                <h:outputText value="COUNT"/>
              </f:facet>
              <h:outputText value="#{lairage.count}"/>
            </h:column>
            
            <h:column>
              <f:facet name="header">
                <h:outputText value=" 操 作"/>
              </f:facet>
              <h:commandLink action="#{countSaveController.updateItem}">
                <h:graphicImage url="image/edit.gif" style="border: 0px"
                                width="16" height="16" alt="编辑"/>
              </h:commandLink>
              <!--onmousedown="javascript:confirm('真的要删除吗?');"-->
              <h:commandLink immediate="true"
                             action="#{countSaveController.deleteItem}">
                <h:graphicImage style="border: 0px" width="16" height="16"
                                url="image/delete.gif" alt="删除"/>
              </h:commandLink>
            </h:column>
          </h:dataTable>
        </div>
        <table cellspacing="0" style="font-size: 9pt" cellpadding="0" border="1"
               width="100%">
          <tr>
            <td>
              <h:outputLabel value="#{countSaveController.sumPage}"/>
              页 第
              <h:outputLabel value="#{countSaveController.currentPage}"/>
              页 共计
              <h:outputLabel value="#{countSaveController.sumRecord}"/>
              条记录,当前页有
              <h:outputLabel value="#{countSaveController.currentCount}"/>
              条记录
            </td>
            <td>
              <h:commandButton id="FirstPage" value="起始页"
                               action="#{countSaveController.FirstPageList}"/>
              <h:commandButton id="PrePage" value="上一页"
                               action="#{countSaveController.PrePageList}"/>
              <h:commandButton value="下一页"
                               action="#{countSaveController.NextPageList}"/>
              <h:commandButton value="末尾页"
                               action="#{countSaveController.LastPageList}"/>
            
              <h:inputText id="goPage" value="#{countSaveController.gotopage}" size="5"/>
           
              <h:commandButton value="查 看" action="#{countSaveController.GotoPageList}"/>
            </td>
            <td>
              <h:commandButton value="刷新"
                               action="#{countSaveController.getAll}"/>
            </td>
          </tr>
        </table>
      </h:form></body>
  </html>
</f:view>

⌨️ 快捷键说明

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