cancel
Showing results for 
Search instead for 
Did you mean: 

Table Sorter

Former Member
0 Kudos

Hi All,

By using the utility TableSorter.java I tried to implement Table Sort Functionality. When i am executing, I can see th sort arrows but when i am pressing that I canot see any changes.. in addition to that.. the icon(up and down arrow for sorting) going after one click.

My code is:

In wdDoModifyView:

if (firstTime) {

IWDTable table = (IWDTable) view.getElement("Tab_SO");

wdContext.currentContextElement().setTableSorter(new TableSorter(table, wdThis.wdGetSortAction(), null));

}

In Sort Action:

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

Please help me in this.

Thanks,

Raz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi...

Make sure that you have binded the action Sort that you have declared

is binded to the Events (on sort ).

And also check that the atrribute in the context is of type tablesorter

java class .

Also make sure that the TableSorter.java is saved in the pakages folder of your project ...in the navigator perspective

Regards

madhavi

Answers (3)

Answers (3)

nikhil_bose
Active Contributor
0 Kudos

use this code to initialize TableSorter


wdContext.currentContextElement().setTableSorter( new TableSorter( table, wdThis.wdGetSortAction(), new HashTable());

nikhil

Former Member
0 Kudos

Hi All,

Tahnks for quick responce. The TableSorter.java is assigned to project and i can see that. The sort event is created at table properties and that actio is assigned to TableSorter function in domovidfyview method.

It seems all are assigned properly. Is there any other reason for this?

And I tried by adding new Hashtable() to Tablesorter, but still no joy.

Please suggest me.

Thanks,

Raz

Former Member
0 Kudos

Thanks all.

I can able to solve it. But I dont know whats the problem, when I did complete process once again it works.

Thanks,

Raz

Former Member
0 Kudos

Hi,

check tablesorter value atrribute is type of that tablesorter.java class.and also check sort event of table is binded to the sort action.

Thanks

Abhilasha

Former Member
0 Kudos

Hi,

Make sure that Table Property onSort Event assigned to the correct event.

Thanks

Krishna