excel- bootstrap -table-filter-bundle. js показывает значения в списке фильтров из приведенных выше таблиц - PullRequest
1 голос
/ 12 июля 2020

Я пытаюсь создать фильтр типа Excel в моей таблице bootstrap, используя excel- bootstrap -table-filter-bundle. js. Фильтр работает, но показывает не только значения из рабочей таблицы, но и значения из приведенных выше таблиц. Это моя страница jsp:

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="java.util.*"%>
<!DOCTYPE html>
<html>
<title>Scheda Cliente</title>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.10.1/bootstrap-table.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.10.1/bootstrap-table.min.js"></script>
<link rel="stylesheet" href="https://www.jqueryscript.net/demo/Excel-like-Bootstrap-Table-Sorting-Filtering-Plugin/excel-bootstrap-table-filter-style.css">
<script src="https://www.jqueryscript.net/demo/Excel-like-Bootstrap-Table-Sorting-Filtering-Plugin/excel-bootstrap-table-filter-bundle.js"></script>

<meta name=”vs_targetSchema” content=”http://schemas.microsoft.com/intellisense/ie5″&gt;>
<style>
th, td {
    text-align: center;
}
</style>
</head>
<body>

        <div id="Forniture_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
        <h3 class="sub-header">TABLE 1</h3>
        <div class="row">
        <div class="col-sm-1">
        <div class="dt-buttons btn-group">      
        </div>
        </div>
        </div>
        <table id="tableA" 
        class="table table-striped table-bordered dataTable" 
        data-filter-control="true" 
        data-show-multi-sort="true">
                <thead>
                        <tr>
                                    <th>1a</th>
                                    <th>1b</th>
                                    <th>1c</th>
                        </tr>
                </thead>
                        <c:forEach items="${fornitureList}" var="forniture">
                            <tr>
                                <td>${forniture.nrContratto}</td>
                                <td>${forniture.commodity}</td>
                                <td>${forniture.statoContratto}</td>
                                
                            </tr>
                        </c:forEach>
                    
                </table>
        </div>
        
        
        <div id="FattureP_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
        <h4 class="sub-header">TABLE 2</h4>
        <div class="row">
        <div class="col-sm-1">
        </div>
        </div>      
        <table id="tableB" class="table table-striped table-bordered">
                <thead>
                        <tr>
                <th>2a</th>
                <th>2b</th>
                <th>2c</th>
            </tr>
            </thead>
            <c:forEach items="${listfattureClientePagate}" var="fattureClienteP">
                <tr>
                    <td>${fattureClienteP.nrContratto}</td>
                    <td>${fattureClienteP.nrFattura}</td>
                    <td>${fattureClienteP.dataFattura}</td>
                </tr>
                </c:forEach>
                </table>
        </div>
    
    <script>     
        
        $(function () {
              $('#tableA').excelTableFilter();
        });
        
        $(function () {
              $('#tableB').excelTableFilter();
        });

    </script>
</body>
</html>

Как видно из фильтра изображений ниже в таблице 2, столбец b показывает последнее значение из столбца b таблицы 1. спасибо введите описание изображения здесь

...