cancel
Showing results for 
Search instead for 
Did you mean: 

Paged UI table with filter - how to handle?

former_member190457
Contributor
0 Kudos

Hi developers,

I am using this excellent [guide|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0d6c30a-c99e-2b10-f09b-c9a00b7e78c6] by Bertram Ganz, so that my UI table doesn't load all backend records, but performs pagination.

In addition, I want to perform filtering on the table.

Since records are loaded on-demand, I assume filtering would be performed only on loaded records.

How can I achieve a behaviour similar to the one experienced with full table read?

The same for sorting, how does this affect pagination?

Thanks and regards

Vincenzo

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member190457
Contributor
0 Kudos

answer: dig up your bravery and implement the interface mentioned.

nitin_mahajan2
Contributor
0 Kudos

Thats the beauty of java:-) lets you be creative.

and brave too:-)

Regards,

Nitin

Edited by: Nitin Mahajan on Jun 22, 2009 8:28 PM

nitin_mahajan2
Contributor
0 Kudos

Not in WD but i have worked on such issue in regular java jsp application.

You need to ofcourse use pagination.

Total number of records = 9999

Set a limit to the number of records you fetch from your source : N = 500

Number of records shown on one page : 25

Number of pages = 20

Use two custom buttons Previous , Next on the table to get the next / previous 25 records

Use a counter to increase the page counter.

When the page counter reaches 19 or 20, get another set of 500 records from the source.

This way, if you use sorting on the table, that will happen only on the 500 records you have.

To help the user, you can put, a message at the top as "Showing 501 to 1000 entries of total 9999"

Also, you can use a field to get the value of page from user. If value is <= 20 , get the result from the same set, if it is more than, then you will have to handle accordingly.

Sounds complex, but it is pretty simple.

~Nitin

Former Member
0 Kudos

Hi,

In this case you cannot use WDTable default pagination.

You have to implement your own custom pagination like Next and Previous buttons.

For filteration in WD actuallly what we do is:

We create three nodes.

TestNode (Actual node binded to table)

TestSourceNode(Source node which contains all the data)

FilterNode (Contains filteration criteria and will be binded to FilterValue property of table column).

As per your requriement.

You will have one model node which will have all the data (For ex: 100 records) from backend.

For example,

Initially you loads the table with 10 records.

For this you need to fill TestNode & TestSourceNodes as well from model node data.

Again when user clicks on next , next 10 records (10-20) will be loaded in both the nodes as above.

So even TestSourceNode which is used to store the source data also contains only 10 records at any point of time and filtering happens with in those records.

To remove the WDTable default pagination, change the footer visible property to false and make sure at any point of time the node size should not exceed the table visible row count.

Why all this procedure is : As per my knowledge there is no possbiity to catch the event of the WDTable default pagination.

So to achieve this requirement, you have to implement custom pagination.

Hope this helps.

Regards,

Charan

former_member190457
Contributor
0 Kudos

Hi all, thanks for you replies

Did anyone use the ICMIObservableList interface as described in the guide I mentioned in my original post (it seems the most stable and framework-oriented way to achieve pagination)?

Thanks and regards

Vincenzo

nitin_mahajan2
Contributor
0 Kudos

Yes, Absolutely, this is complete custom code, no default features.

You implement it custom, you know what you are doing and makes your life simpler when it comes to digging out the issues and fullfilling the never dying demands of the users.

Regards,

Nitin

Former Member
0 Kudos

Hi Vincenzo,

I have a similar issue. Have you found a solution to it?

I was going through the articles and documents available on SDN and help.sap.com. It is recommended that data intense functionality like sorting and filtering should ideally be provided by the model.

Regards,

Kartikaye