|
In the custom and auto UDM, a javascript based paging ribbon is
available in the default-generated templates.
zeroCode generates a band or a ribbon of numbers by internally calculating
the intervals.
This code takes two values:
- The total no of pages or the link, which is captured from FreeMarker
code
- The clicked page number, which is also taken from FreeMarker code.
The maximum links to be displayed on the form with the intervals
will be approximately eighteen
The links are got using the above mentioned data (i.e. the total
number of link and the page number clicked), the function calculates
the intervals and puts the resultant numbers in a format as shown
below. This includes the clicked number, two links before and after
the clicked link. By default the first and the last link will also
be added in a consecutive manner into the ribbon. The dotted line
in the format below represents the intervals while the hyperlinks
enable you to retrieve data in different pages.
For e.g. if the clicked number is "14"
And the Total Link is "36" then
the link will be as shown below:
< 1 2 3 4....8.......12 13 14 15
16........20...24...26...28..32...36 >
- · While the page is loaded, if the total number of links is
less than eighteen then only those pages with the clicked link
will be displayed.
For e.g. < 1 2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19 20 >
- If the links are greater than eighteen then the first five links
are displayed after which the code takes the interval and displays
the remaining (the first link and the last will always be displayed
as default). The set of links is refreshed every time you click
on the link on a particular page number.
This javascript-based paging ribbon helps you deal with large
amounts of data more intuitively.
|