cancel
Showing results for 
Search instead for 
Did you mean: 

TableSorter empty column problem

Former Member
0 Kudos

Hi,

I am using Generic TableSorter class.When there is empty column in the table and if i click the column header(to Sort or accidentaly pressed) it is crashing.

How can i solve this problem.I thought of checking in the onActionSort method if the column is empty and then decide to execute the satement

wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.nodeCustomer());

But i dont know how to check if the column is empty ?.May be some of you might know how to solve this in better way than mine.All your help is appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello Baskaran,

Are you using TableSorter from dynpro tutorial? What kind of errors are you getting? To check whether node is empty you can call method size() from IWDNode

 if( 0!=wdContext.nodeCustomer().size() ) { ... 
}

.

Best regards, Maksim Rashchynski

Former Member
0 Kudos

Hi ,

In my case the Node is not empty.

BTW -My collegue has just solved the problem in TableSorter.java itself.

if(dataSource.isEmpty() == false)

{

dataSource.sortElements(reversable);

}

Answers (0)