Bootstrap list paging and querying (data and page separation form)

Source: Internet
Author: User
Bootstrap two forms of paging:
All load data, and then page and query in JS, background paging, through the background to load a page of data; In the background to send JSON data to the foreground, the foreground through JS processing, generate table, HTML or JSP page display.
The data is processed in both ways through the "$ (ID of page table). bootstraptable{()};" Function. Next, the parameters inside
1.method: Request method. Two kinds of get and post.
2.url: Request address.
3.dataType: Type. Json
4.search: The search box is displayed. True: do not display; false: Display
5.sidePagination: Set to server side paging. There are two kinds of parameters, server: service-side request; client: Clients request
6.pageSize: Number of bars per page.
7.queryParams: Set parameters (want to send the background parameters, 4: a.limit;b.offset;c.search;d.order;e.sort;)
8.responseHandler: Response background parameters.
9.columns:[{}] Data column
Note: The request address JS will add the parameter "LIMIT=5&OFFSET=0&ORDER=ASC". The limit parameter is the first number of Pagesize;offset per page, for example: the first page is offset=0 and the second page is offset=10.


Front


Background controller (the page is temporarily not encapsulated)
Properties of columns:
1.field: Background JSON key
2.title: Title
3.visible: Hide Column false: Hide true: Do not hide
4.sortable: Can sort true: can false: No
5.valign: On its way
6.formatter:function (value, row, index) {} content in custom columns (for example, modify buttons, delete buttons)
7.events:function () {} Action functions for content in custom columns (for example: Modify, delete)

Project Download Address: http://vdisk.weibo.com/s/tnPMj8sanfnT/1427438640

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.