cancel
Showing results for 
Search instead for 
Did you mean: 

TableSorter

Former Member
0 Kudos

Hi Everybody,

I have done the following steps :

1. Create a folder in the src->packages folder say util

2. Place the TableSorter.java in that folder.

3. Create a Context variable in the view say 'sorter' and in its properties enter the type say com.test.util.TableSorter

4. Get the table and assign the sorter context to it.

IWDTable table = (IWDTable)view.getElement("<table name>");

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

5. Create a method sort and write the below code: (the node in the code refers to the table)

wdContext.currentContextElement().getSorter().sort(wdEvent,wdContext.<node tablename>);

But still I am unable to get the sort action on the table.

I am unable to see the options.

Please help.

Thanks,

Sirisha Matta.

Message was edited by:

Supriya Manik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Supriya,

In wdDoModify method, please add following code


if (firstTime) {
IWDTable table = (IWDTable) view.getElement("Table");//Table UI elemnt ID
		wdContext.currentContextElement().setTableSorter(
			new TableSorter(table, wdThis.wdGetSortAction(), null));}

Regards,

ganga

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Supriya

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

Regards

Chaitanya.A

Former Member
0 Kudos

Instead of creating a method you have to create an action (with an an according method which is created automatically) which you have to bind to the sort-action of the table.

Former Member
0 Kudos

I have done all this.But still I am unable to sort the table,though I see the hand cursor.

I am getting the node and the data from the model.

Do I need to do something else???

This is the version I am using.

<b>SAP NetWeaver Developer Studio

Version: 7.0.09

Build id: 200610260145

This product includes software developed by the

Apache Software Foundation http://www.apache.org/

Eclipse.org http://www.eclipse.org/</b>;

Former Member
0 Kudos

My experience is that it is <b>VERY</b> important that the node which contains the data which should be sorted is a <b>VALUENODE</b> and <u>not</u> a MODELNODE!