关于jsp table表格拆分

这篇博客主要展示了如何在JSP中拆分表格,包括表格的头部和主体部分,同时涉及到表格数据的展示和操作。内容涵盖表格的HTML结构、JSP标签库的使用,以及表格内组件如下拉菜单的实现。此外,还提到了表格数据的搜索和导出功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



打广告:美团点评内部推荐入口


<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@page language="java" contentType="text/html;utf-8" %>
<html lang="en">
<head>
    <%@include file="../include/include.jsp"%>
</head>
<body>
<!-- ============== Navigation Bar ================================ -->
<%@include file="../common/head.jsp"%>
<!-- ============== /Navigation Bar ================================ -->

<div class="container">

    <div class="page">

        <section id="header_MERMangement_Preparation">
            <div class="row">

                <h3>Project Components <small style="color: red">Restful API</small></h3><br><br>

            </div>
        </section>
        <form action="search" name="searchForm" style=" margin-bottom: 0">
            <section id="projectSearch">
                <div class="row">
                    <div class="accordion" id="queryAdvanced">
                        <div class="accordion-group well" id="contentWidhtRuler">
                            <div class="accordion-heading">
                                <div class="row">
                                    <div class="span11 form-inline">
                                        <fieldset>
                                            <label class="control-middle-label" >Project url:</label>
                                            <form:select path="url" >
                                                <option></option>
                                                <form:option value="1">STS</form:option>
                                                <option value="4">IPP</option>
                                            </form:select>
                                            <button class="btn btn-primary" type="button" onclick="query();">
                                                <i class="icon-search icon-white"></i>Query
                                            </button>
                                        </fieldset>
                                    </div>

                                    <div class="span1" style="text-align: right">
                                        <a class="btn btn-info btn-mini"
                                           style="vertical-align: middle; margin-right: -11px;"
                                           href="#collapseQueryAdvanced" data-toggle="collapse"> <i
                                                class="icon-chevron-down"></i>
                                        </a>
                                    </div>
                                </div>
                                <hr>
                            </div>

                            <div id="collapseQueryAdvanced" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <fieldset class="row" style="margin-top: 0px;">
                                        <div class="span4 form-horizontal">
                                            <fieldset>
                                                <div class="control-group">
                                                    <label class="control-middle-label" for="fcstArCollDateTo">Project Name:</label>

                                                    <div class="controls">
                                                        <input type="text" class="span2" id="fcstArCollDateTo"
                                                               name="project_key"
                                                               value="" />
                                                    </div>
                                                </div>

                                            </fieldset>
                                        </div>
                                        <div class="span4 form-horizontal">
                                            <fieldset>
                                                <div class="control-group">
                                                    <label class="control-middle-label" for="fcstArCollDateTo">Project key:</label>

                                                    <div class="controls">
                                                        <input type="text" class="span2" id="fcstArCollDateTo" placeholder="yyyy-mm-dd"
                                                               name="project_key"
                                                               value="" />
                                                    </div>
                                                </div>

                                                <%--    <div class="control-group">
                                                        <label class="control-middle-label" for="serviceLine">Service Line:</label>

                                                        <div class="controls">
                                                           <input  type="text" name="asdf"/>
                                                        </div>
                                                    </div>--%>

                                                <%--    <div class="control-group">
                                                        <label class="control-middle-label" for="account">Account:</label>

                                                        <div class="controls">
                                                            <input type="text" class="span2" id="account"
                                                                     name="conditions.account"
                                                                     value=""/>
                                                        </div>
                                                    </div>--%>

                                            </fieldset>
                                        </div>


                                    </fieldset>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </form>
        <section id="buttonBar">
            <div class="row form-actions">
                <p class="pull-left" style="margin: 0px;">
                    <button type="button" id="createMilestoneBatch" onclick="exportSearchReslut();"
                            class="btn btn-primary">Export Report</button>
                </p>
            </div>
        </section>


        <section id="listProject">
            <div class="row" style="margin-top: 0px;" >
                <g:form name="statusForm" action="updateStatus" method="post">
                    <table class="table table-bordered table-list" id="MyTable">
                        <thead>
                        <tr freezeTop class="table-middle table-center" style="background-color: #f5f5f5;">
                            <th freezeLeft class="tooltip-demo well">NO.</th>
                            <th freezeLeft>Project Name</th>
                            <th freezeLeft class="tooltip-demo well">Components</th>
                            <th freezeLeft class="tooltip-demo well">Version</th>

                        </tr>
                        </thead>
                        <tbody>
                        <core:forEach items="${projectDtoList}"  varStatus="counter" var="list">
                            <tr>
                                <td freezeLeft nowrap style="text-align: left;background-color:#fdfdfd" > ${counter.count}</td>
                                <td freezeLeft nowrap style="text-align: left;background-color:#fdfdfd" > ${list.name}</td>
                                <core:if test="${list.componentsList!=null}">
                                <core:forEach items="${list.componentsList}" varStatus="Num" var="coplist">
                                    <core:if test="${Num.count==1}">
                                        <core:set var ="rowspan" value="${fn:length(list.componentsList)}"></core:set>
                                        <core:set var="numline" value="${counter.count}"></core:set>
                                        <core:set var ="numrow1" value="${counter.count+1}"></core:set>
                                        <core:set var ="numrow2" value="${counter.count+rowspan-1}"></core:set>
                                        <td freezeLeft nowrap style="text-align: left;background-color:#fdfdfd" rowspan="${rowspan}"  > ${list.componentsList[1]}</td>
                                    </core:if>
                                </core:forEach>
                                </core:if>
                                <core:if test="${list.componentsList==null}">
                                    <core:if test="${counter.count!=numrow1 && counter.count!=numrow2}">
                                    <td freezeLeft id="cas11" nowrap style="text-align: left;background-color:#fdfdfd"  > ${list.componentsList}</td>
                                    </core:if>
                                </core:if>
                                <td freezeLeft nowrap style="text-align: left;background-color:#fdfdfd" > version</td>
                            </tr>



                        </core:forEach>
                        </tbody>
                    </table>
                </g:form>
            </div>
            <!-- Pagination -->
            <g:searchPagination formID="searchForm"/>

        </section><!--list_ProjectManagement-->

    </div>

    <!-- List -->

    <!-- ============== Footer ================================ -->
    <%@include file="../common/foot.jsp"%>
    <!-- ============== /Footer ================================ -->
</div> <!-- /container -->

</body>
</html>




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值