bootstrap-table顯示資料時顯示No matching records found
今天由於要實現查詢功能,所以需要更新列表顯示,使用bootstrap-table時,後臺controller通過使用@responsebody傳回查詢結果的json串,postman除錯結果顯示沒問題,如圖所示:
但是jsp頁面的bootstrap-table一直顯示No matching records found,除錯了很久,但是沒報錯,後來把bootstrap-table的分頁請求引數註釋後解決問題,未深入研究原始碼,不清楚問題所在,希望有了解的大神解釋一下。註釋後的請求程式碼如下
var TableInit = function () { var oTableInit = new Object(); //初始化Table oTableInit.Init = function () { $('#studentTable').bootstrapTable({ url: '/StudentInfo/student/listData', //請求後臺的URL(*) method: 'post', //請求方式(*) //toolbar: '#toolbar', //工具按鈕用哪個容器 striped: true, //是否顯示行間隔色 cache: false,//是否使用快取,預設為true, //pagination: true, //是否顯示分頁(*) //sortable: false, //是否啟用排序 //sortOrder: "asc", //排序方式 queryParams: oTableInit.queryParams,//傳遞引數(*) sidePagination: "server", //分頁方式:client客戶端分頁,server服務端分頁(*) // pageNumber:1, //初始化載入第一頁,預設第一頁 //pageSize: 50, //每頁的記錄行數(*) //pageList: [10, 25, 50, 100], //可供選擇的每頁的行數(*) strictSearch: true, clickToSelect: true, //是否啟用點選選中行 height: 460, //行高,如果沒有設定height屬性,表格自動根據記錄條數覺得表格高度 uniqueId: "id", //每一行的唯一標識,一般為主鍵列 cardView: false, //是否顯示詳細檢視 detailView: false, //是否顯示父子表 columns: [{ field: 'sno', title: '學號' },{ field: 'sname', title: '姓名' }, { field: 'gender', title: '性別' },{ field: 'major', title: '專業' }] }); }; //得到查詢的引數 oTableInit.queryParams = function (params) { var temp = { //這裡的鍵的名字和控制器的變數名必須一直,這邊改動,控制器也需要改成一樣的 limit: params.limit, //頁面大小 offset: params.offset, //頁碼 }; return temp; }; return oTableInit; };
相關推薦
MVC bootstrap-table顯示資料時顯示No matching records found
問題:bootstrap-table載入資料不顯示 @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml";}<script> $(function () { InitMainTable(); docu
bootstrap-table顯示資料時顯示No matching records found
今天由於要實現查詢功能,所以需要更新列表顯示,使用bootstrap-table時,後臺controller通過使用@responsebody傳回查詢結果的json串,postman除錯結果顯示沒問題,如圖所示: 但是jsp頁面的bootstrap-tab
在使用bootstrap-table匯出excel時遇到了問題:第一列顯示為on
使用bootstrap-table自帶的匯出excel時,頁面第一列為複選框,如圖: 此時匯出的excel會多出一列,且值為on,如圖: 解決辦法如下,直接上程式碼: exportOptions : { ignoreColumn: [0], fil
bootstrap table 分頁只顯示分頁不顯示總頁數等數據
分頁 總頁數 ati pull bsp hal AI pla blog 搜了下沒找到解決方案,就用CSS來解決了。 把paginationDetailHAlign:"right",使pagination-detail的class為.pull-right.paginatio
解決bootstrap-table-fixed-columns.js顯示列與隱藏列按鈕切換表格不對齊
<table class="table-striped table-hasthead nowrap" id="tableTest1" data-search="true" data-show-columns="true" data-fixed-columns="true" data-fixed
向mysql資料庫中插入資料時顯示“Duplicate entry '1′ for key ‘PRIMARY' ”錯誤
錯誤情況如題,出現這個錯誤的原因十分簡單: 很明顯,這是主鍵的問題。 在一張資料表中是不能同時出現多個相同主鍵的資料的 這就是錯誤的原因,解決的方法: 1.可以將這張表設定成無主鍵(mysql支
[轉] BootStrap table增加一列顯示序號
原文地址:https://blog.csdn.net/aboboo5200/article/details/78839208 最近由於專案需要,使用BootStrap table做資料展示,其中要在第一列顯示序號,如圖所示:這裡寫圖片描述查看了API,發現bootstrap table並沒有像其他表格元件提
jquery-easyui中列表控制元件datagrid沒有資料時顯示列表為空資訊
jquery-easyui控制元件datagrid下,如果有資料,會顯示按照列表顯示,如果沒有資料,那麼會顯示如下的介面。沒有任何提示。 為了讓沒有資料的情況下,提示“列表為空”,我們需要設定datagrid屬性。這個屬性就是emptyMsg。預設情況下,這個屬性是為空,沒有值。
android 載入資料或提交資料時顯示轉圈的提示頁面
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false" > <item android:drawable="@dra
擴充套件:gridview 空資料時顯示錶頭
2015年7月14日16:50:06 Gridview 預設展示資料時,若資料為空,則表格不顯示,顯示不美觀。 針對此問題進行擴充套件: using System.Web.UI.WebControls; public static class GridViewExtension {
WebView 載入資料時顯示進度條,載入完後再把進度條取消並顯示內容
轉載地址:http://blog.sina.com.cn/s/blog_7a66361301011a46.html webview 載入資料時顯示進度條有兩種. 第一種方法 這個是載入資料時顯示進度條 super.onCreate(savedInstanceState);
Bootstrap Table 實現列格式化顯示
格式化使用函式formatter 例如: formatter: function (value, row, index) { if (value == 'en')
bootstrap-select 無資料時title屬性失效問題
bootstrap-select 無資料時title屬性失效問題 bootstrap-select版本: v1.13.2 專案裡有一些下拉框是聯動於其他下拉框,有個需求是在聯動的下拉框未選擇值得時候,這個下拉框內的文字資訊是“請先選擇**”這樣的內容 查詢後發現可以這麼改:
Bootstrap Table 多頁時實現換頁選中且可回顯勾中功能
一 背景 在工作中利用Bootstrap Table 做資料列表時可選資料,但是換頁時上一頁資料不能攜帶和回顯,只能操作選中當前頁資料,造成不好的使用者體驗 二 解決方案 1)利用Bootstrap Table 提供的API監聽選中與取消選中 定義
EasyUI中tree元件不顯示資料或者顯示undefined的解決方案
這幾天學習easyUI,用到了tree元件,蛋疼了N天,終於出來了,現在總結幾個問題。 1、官方demo裡,取的資料都是在.json檔案裡取的,在實際應用中顯然不能這麼做,要從資料庫中取出,那麼問題來了,怎麼取?官方demo裡也沒有說明,在網上找半天也沒找到什麼結果,現做如
用js快速動態生成bootstrap table表格資料
var $table = $('#table');//繫結表格id $(function () { buildTable($table, 24, 24); //設定所要載入的表格列數和行數,此處為24行24列 }); function buildTable(
QT中QTextEdit中append追加顯示資料,顯示固定行數資料。
版本:qt5.7.1我的本意是寫日誌,但是一直寫資料,不清空QTextEdit的話,會導致異常。一開始我是這樣處理的:if (ui.logTextEdit->document()->blockCount() > 100) { ui.logTextEdit-
No matching distribution found for opencv-python
No matching distribution found for opencv-python sudo pip3 install opencv-python [email protected]:~$ sudo pip3 install opencv-python T
jpype RuntimeError: No matching overloads found for calc in find
jpype RuntimeError: No matching overloads found for calc in find. at native\common\jp_method.cpp 由於需要python呼叫第三方jar包,所以使用jpype,但測試時出現上述錯誤
Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package
錯誤資訊: ...... FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugGoogleServices'. > No ma