Use the Easyui paging mechanism in the background using the Oracle foreground

Source: Internet
Author: User

The paging property is set in the DataGrid of the foreground Easyui:

pagination:true,//display pagination
Pageposition: ' Bottom ',//page bar position both up and down bottom, top
pagelist:[12,24,36]//Paging Data size

In the background Java code int page, int rows write set, get method.

page = Integer.parseint (request.getparameter ("page"));
rows = Integer.parseint (Request.getparameter ("Rows"));
startindex= (page-1) *rows;

Background Oracle paging uses rownum for paging. SQL statement Instance

SELECT *

From (

Select Id,name,rownum as num

From student

)

where num between and 20

Remember that rownum must use aliases, and you cannot use >= and <=, only between and.

The backend passes JSON data to the foreground, including total and rows.

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.