on 05-23-2008 3:10 AM
Hi
I followed the following blog to implement sorting on flight list
/people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s
But I am not getting sort icons for the table so I dont know whether sorting is working or not.
Please let me know why sorting icons are not visible
Thanks
Bala Duvvuri
Please help me in understanding
wdContext.currentContextElement().setCustomerTableSorter(
new TableSorter(table, wdThis.wdGetSortCustomersAction(), null, new String[] { "CustomerTable_Name" }));
which is in the blog mentioned in the post.what is this CustomerTable_Name
If i comment the below code in the wdDoModifyView()
if (firstTime) {
//view.nowCreateAllCustomExtensionFields();
IWDTable table = (IWDTable) view.getElement("Table");
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("User:3"+table);
wdContext.currentContextElement().setTableSorter(
new TableSorter(table, wdThis.wdGetSortAction(), null, new String[] { "Table" }));
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("User:3"+wdContext.currentContextElement().getTableSorter());
}
I am able to see the sort icons in my table.But if i click on them obviously it will throw exception.
Please help me in resolving this issue
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bala,
The best way to understand TableSorter might be directly inspecting its source code.
FYI. About "CustomerTable_Name":
public TableSorter(IWDTable table, IWDAction sortAction, Map comparators, String[] sortableColumns) {
init(table, sortAction, comparators, sortableColumns);
}
So, the "CustomerTable_Name" should be the column-names of the Table UI Element, by which you would like to sort.
If you want to sort by "Column1", just use {"Column1"}.
HI Bala,
here
wdContext.currentContextElement().setCustomerTableSorter(
new TableSorter(table, wdThis.wdGetSortCustomersAction(), null, new String[] { "CustomerTable_Name" }));
CustomerTableSorter is the context whos datatype is tablesorter class.
new TableSorter(table, wdThis.wdGetSortCustomersAction(), null, new String[] { "CustomerTable_Name" }));
its the constructor...
"CustomerTable_Name" is the name of table column. on which sorting is performed.
Hi,
Is it possible to view the sorting icon without implementing tablesorter class. I know it can be achieved by adding image to header, but i want to enable the original one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.