cancel
Showing results for 
Search instead for 
Did you mean: 

TableSorter icon disappeared

Former Member
0 Kudos

Hi all,

I am using TableSorter.java class for many table in my wd4j DC.

The class version is from https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3287

I have got a problem only for one column of my table. When I click the sorter icon, the data are sorted but the icon disappear.

My wd is rendered into EP.

NWDS: 7.0.11

JDK: 1.4.2_9

SAP-JEE: 7.0.14

in my wdDoModifyView


if (firstTime) {		
   view.nowCreateAllCustomExtensionFields();
   IWDTable table = (IWDTable) view.getElement("Table");
   wdContext.currentContextElement().setTableSorter(new TableSorter(table, wdThis.wdGetSortAction(), null, new String[] {"first_column_id", "second_column_id"}));

in onActionSort method


wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.node<table_source_node>());

Any advice?

Thanks for your replies.

Best regards,

Mirco.

Accepted Solutions (0)

Answers (2)

Answers (2)

nikhil_bose
Active Contributor
0 Kudos

replace


if (firstTime) {		
   view.nowCreateAllCustomExtensionFields();
   IWDTable table = (IWDTable) view.getElement("Table");
   wdContext.currentContextElement().setTableSorter(new TableSorter(table, wdThis.wdGetSortAction(), null, new String[] {"first_column_id", "second_column_id"}));

by


if (firstTime) {		
   view.nowCreateAllCustomExtensionFields();
   IWDTable table = (IWDTable) view.getElement("Table");
   wdContext.currentContextElement().setTableSorter(new TableSorter(table, wdThis.wdGetSortAction(), new Hashtable(), new String[] {"first_column_id", "second_column_id"}));

else

. check onSort action is assigned to proper method/event

. check TableColumn IDs are correct.

nikhil

Former Member
0 Kudos

hi , thanks for your replies.

I checked the code and seems to be right.

The only column on which the TableSorter class does not work is a column that not every time is displayed. It depends by the kind of my request.

Could be this one the problem?

Thanks,

Mirco.

nikhil_bose
Active Contributor
0 Kudos

I am not sure about this use case. I might think of passing Colum_ ID and Direction to TableSorter.java.

nikhil

Former Member
0 Kudos

Ok my problem is solved. It was exist because all the columns in my table are tableGroupedColumn and the column in subject (added later) was a TableColumn.

Modyfing the column's type every thing seems to be ok.

Thanks for your replies guys.

Best regards,

Mirco.

Former Member
0 Kudos

hi,

for this check the propert of table column sortState.

Thanks and regards

Trilochan