on 10-04-2007 10:39 AM
How do we create action for the table sort option?
Can someone give the steps for Table Sorting?
Thanks,
Supriya Manik.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please someone give me a way out please.
Its urgent I neeed the solution.
Marks assured.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please see this doc that tells about filtering tables. I think that can be used for sorting also.
Regards
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.