on 10-31-2007 9:15 AM
Hi,
I am facing problems while sorting table.
Sorting is not taking place after clicking on column header.In fact no action is getting called when user clicks on table header.
I have followed all the steps in tutorial "Developing with tables in Web Dynpro".
The table to be sorted is in popup window.
There is one more table in main view (not in popup view), for which sorting is
working fine
I have added try - catch block for the sort action as well as in wdDoModifyView
method and there is no exception.
What can be causing problem?
Thanks in advance,
Apurva
Hi,
Problem got solved by changing Table Sorter.
Regards,
Apurva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pedro,
I am Nikhil, Apurva's colleague, working on the same Sorting application.
I have tried the new TableSorter.java, but still the problem persists.
Actually, we are getting NullPointerException in sort method of TableSorter. The exception is because we are getting columnId and direction null from the foll. code
String columnId = wdEvent.getString("selectedColumn");
String direction = wdEvent.getString("sortDirection");
Plz let us know what are we missing.
Regards
Nikhil
Hi,
After adding some debugging comments, I got that column id passed to 'sort ' method 'TableSorter' class in utilities is null.
Hence, no sorting is taking place.But I still don't know why column id is not getting passed?
Any help?
Also, there is one property called 'sort state' for column of the table.What is significance of this property?
Regards,
Apurva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. When I added action for onActionSort I get small triangle in table header row.
Sort method is executed but no sorting take place.
Sorting is working for other table without giving any event for onSort.Big sorting
symbol becomes visible when I click on any cell in header row and sorting take
place based on that column. But the same thing is not working in other table.
Are there two types of sorting in Web Dynpro?
2. Table name is correct, Node name is correct.
What can be the reason for the problem?
Thanks in advance,
Apurva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apurva,
The steps are good, say me
Where has you put this code? in what view?
In wdDoModifyView, do you have some additional code?
Greetings
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apurva,
Do you set the sort action for column onAction event?
Check it.
It may be a problem in your case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for quick response.
Steps I followed for Sorting are as follows:
1. Created context attribute 'TableSorter' of type TableSorter
2. Created Action 'Sort'
3. Added following code in wdDoModifyView
if (firstTime) {
IWDTable table = (IWDTable) view.getElement("TableName");
wdContext.currentContextElement().setTableSorter(
new TableSorter(table, wdThis.wdGetSortAction(), null));
}
4.Added following code in onActionSort method
wdContext.currentContextElement().getTableSorter().sort(wdEvent,
wdContext.nodeXYZ());
Nothing happens when I click on Table header.
Am I missing some step?
Is it because table is in dialog box and not in main view?
Thanks,
Apurva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apurva,
Two possibilites:
1) Check if the Table`s ID you've specified in the code below is correct or not:
IWDTable table = (IWDTable) view.getElement("TableName");
2) Check if you've bound the correct node to the datasource property of the table. Also, check if you are passing the correct node to the table sorter in the SortAction (which is nodeXYZ() in your case)
Bala
Hi Apurva,
Can u send the code u have written for sorting in wdModifyView as well as in event handler??without that its not possible to find out the problem.
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.