【发布时间】:2018-11-07 20:52:02
【问题描述】:
我在 Bootstrap V4 和 jsp 中成功使用了 BootstrapTable 的服务器端选项
<table class="table table-condensed table-bordered table-hover" id="position-list"
data-toggle="table"
data-url="/pages/positions/p_getRows.jsp"
data-side-pagination="server"
data-filter-control="true"
data-pagination="true"
data-click-to-select="true"
data-id-field="id"
data-page-list="[10, 25, 50, 100, ALL]"
data-show-footer="false"
data-minimum-count-columns="2"
data-pagination="true"
>
<thead>
<tr>
<th data-sortable="true" data-field="Status" data-filter-control="select">Status</th>
...
</tr>
</thead>
<tbody>
</tbody>
</table>
这是p_getRows.jsp ajax 的示例
int fromPos=SecurityIssues.StringToInt(request.getParameter("offset"));
int limit=SecurityIssues.StringToInt(request.getParameter("limit"));
//simplified for illustration purposes
String sqlQuery="SELECT * from (select *,row_number() over (order by position_no) as RowNum from ("+...sql for all positions...+")b ) a where a.rowNum between "+fromPos+" and "+(fromPos+limit);
int numPos=...//number of total positions
%>
{
"total":<%=numPos%>,
"rows":[
<%
for (Row r:listRows) {%>
{
"Status":"<%=r.getStatus()%>",
目前,“状态”组合框填充了 BootstrapTable “看到”的数据。 (即用户在表格中导航的次数越多,组合框将包含的值越多)
如何以编程方式使用预定义值列表设置“状态”组合框?
【问题讨论】:
标签: twitter-bootstrap jsp bootstrap-4 server-side bootstrap-table