cancel
Showing results for 
Search instead for 
Did you mean: 

Table Sorter

Former Member
0 Kudos

How do we create action for the table sort option?

Can someone give the steps for Table Sorting?

Thanks,

Supriya Manik.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

We have a calss called TableSorter which does this function.

To implement it ,create a value attribute say "sorter" of java native type

com.sap.tc.webdynpro.tests.utils.TableSorter. (The package name MIGHT be different.)

In wdDoModifyView,obtaine a refernce to the table objject like

table = (IWDTable)view.getElement("table ui name);

and use

wdContext.currentContextElement().setSorter(

new TableSorter(table, wdThis.wdGet

<action name for sort>Action(), null));

Now inside that action handler,

wdContext.currentContextElement().getTableSorter().sort(wdEvent,

wdContext.node<nodename>());

Regards

Abhijith YS

Answers (6)

Answers (6)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi Supriya

The problem may be in your Table,Have you binded all fields Properly,Check the parameters to call method in the table Sorter.While Creation of the TableSorter please check whether you created that class instance properly or not.

We used the same Sorter class to sort in the table.Can you please send the code of yours and Table Sorter you used.Then only we can help .

Regards

Kalyan

Former Member
0 Kudos

Please someone give me a way out please.

Its urgent I neeed the solution.

Marks assured.

Former Member
0 Kudos

Hi

Probably i am getting it wrong but I think this can be used on a page also....do this thing on an action.

Regards

Avinash

Former Member
0 Kudos

Hi

There is this traditional way of doing this problem...

1) Get the complete data of your table node into an arraylist(or any structure).

2) Sort this with any traditional sorting method.

3) Reassign the same to a node.

4) Bind the table to this new node.

This would surely help.

Regards

Avinash

Former Member
0 Kudos

I need the Sorting Option on the table in the page.

Not the generic sorting.

Former Member
0 Kudos

Hi

Also check the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f699f90-0201-0010-14a4-8950177281ed">Tutorial</a>

Regards

Abhijith YS

Former Member
0 Kudos

I have sone all this,but still I am unable to sort the table by the column!!!!!!!!!!!!!!!!1

Please help.

Former Member
0 Kudos

Hi

Please see this doc that tells about filtering tables. I think that can be used for sorting also.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5...

Regards

Avinash

Former Member
0 Kudos

I can see the Up/Down Key but I am unable to sort the table.

I am unable to achieve the sort functionality.

Please help.

Former Member
0 Kudos

Hi,

Go through <a href="/people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s blog.

Regards,

Satyajit.

Former Member
0 Kudos

follow this blog

/people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s