• tab页两个foreach同步刷新问题


    可以默认显示第一个

    <div class="col-md-12">
    <section class="box10">
    <!-- Custom Tabs -->
    <div class="nav-tabs-custom">
    <ul class="nav nav-tabs">
    <c:forEach items="${variableblock }" var="block" varStatus="s">
    <li <c:if test="${s.index==0 }">class="active"</c:if>><a href="#tab_${block.id }" data-toggle="tab">${block.blockname }</a></li>
    </c:forEach>            //通过两个active控制显示第一个tab
    </ul>
    <div class="tab-content">

    <c:forEach items="${variableblock }" var="block" varStatus="s">      //两个相同的foreach   通过id对应
    <div <c:if test="${s.index==0 }">class="tab-pane active"</c:if> <c:if test="${s.index!=0 }">class="tab-pane"</c:if> id="tab_${block.id }">

    <div class="box-body table-responsive no-padding" style="overflow-x:hidden">
    <table class="table table-hover table-text">
    <thead>
    <tr class="tabth">
    <th style="6%">序号</th>
    <th style="9%">变量名</th>
    <th style="9%">变量标签</th>
    <th style="8%">控件类型</th>
    <th style="7%">默认值</th>
    <th style="8%">受控字典</th>
    <th style="6%">单位</th>
    <th style="8%">变量角色</th>
    <th style="8%">关联规则</th>
    <th style="7%">创建人</th>
    <th style="10%">创建时间</th>
    <th style="7%">备注</th>
    <th style="padding-left: 20px;7%" >操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${block.variablelist}" var="list" varStatus="s">
    <tr>
    <td>${ s.index + 1}</td>
    <td>${list.variablename}</td>
    <td>${list.variabletag}</td>
    <td><c:if test="${list.plugintype==1}">test</c:if>
    <c:if test="${list.plugintype==2}">number</c:if>
    <c:if test="${list.plugintype==3}">date</c:if>
    <c:if test="${list.plugintype==4}">radio(单选)</c:if>
    <c:if test="${list.plugintype==5}">checkbox(多选)</c:if>
    <c:if test="${list.plugintype==6}">download(下拉框)</c:if>
    </td>
    <td>${list.defaultvalue}</td>
    <td>${list.controlledtermid}</td>
    <td>${list.unitid}</td>
    <td>
    <c:if test="${list.roletype==1}">标识变量</c:if>
    <c:if test="${list.roletype==2}">主题变量</c:if>
    <c:if test="${list.roletype==3}">时间变量</c:if>
    <c:if test="${list.roletype==4}">修饰语变量</c:if>
    <c:if test="${list.roletype==5}">规则变量</c:if>

    </td>
    <td>${list.ruleid}</td>
    <td>admin</td>
    <td><fmt:formatDate value='${list.createtime }' type='date' pattern='yyyy-MM-dd HH:mm:ss'/></td>
    <td>${list.memo}</td>
    <td>
    <a class="fa fa-trash fa-lg text-danger" href="javascript:deletevariable(${list.id});"></a>
    <a class="fa fa-pencil fa-lg" style="margin-left: 30px;" href="javascript:updatevariable(${list.id});"></a>
    </td>
    </tr>
    </c:forEach>
    </tbody>
    </table>
    </div><!-- /.box-body -->
    </div><!-- /.tab-pane -->
    </c:forEach>

    </div><!-- /.tab-content -->
    </div><!-- nav-tabs-custom -->
    </section><!-- /.box-body -->
    </div><!-- /.col -->

    当能力支撑不了野心时,就该静下心来学习!
  • 相关阅读:
    2018-09-13 代码翻译尝试-使用Roaster解析和生成Java源码
    2018-09-10 使用现有在线翻译服务进行代码翻译的体验
    2018-09-06 Java实现英汉词典API初版发布在Maven
    2018-08-29 浏览器插件实现GitHub代码翻译原型演示
    2018-08-27 使用JDT核心库解析JDK源码后初步分析API命名
    2018-08-11 中文代码示例之Spring Boot 2.0.3问好
    2018-08-24 中文代码之Spring Boot对H2数据库简单查询
    2018-08-22 为中文API的简繁转换库添加迟到的持续集成
    2018-08-21 中文关键词替换体验页面原型
    vim打开不同的文件
  • 原文地址:https://www.cnblogs.com/1234cjq/p/6482890.html
Copyright © 2020-2023  润新知