cancel
Showing results for 
Search instead for 
Did you mean: 

Table Sort Issue

Former Member
0 Kudos

Hi

I am using TableSorter utility to sort the Table and it is working fine for the table. However, I added a new column to the table, and it is a Calculated value column[contains different icons], The sort does n't work for that new column.

Any thoughts ... Do I need to specifically do the Sort for that column ? if yes, How ?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Vivek,

Unfortunately, TableSorter utility doesnot contain the required implementation for sorting images.

However, if need be then you may implement it. Before doing that, just determine on what parameter

you want to sort the images i.e, height,width, source, alt,etc.,

Edit the bindingOfPrimaryProperty method of Tablesorter.java in the following way.


private static final String bindingOfPrimaryProperty(IWDViewElement element) {
if (element instanceof IWDAbstractDropDownByIndex)
return ((IWDAbstractDropDownByIndex) element).bindingOfTexts();
if (element instanceof IWDAbstractDropDownByKey)
return ((IWDAbstractDropDownByKey) element).bindingOfSelectedKey();
if (element instanceof IWDAbstractInputField)
return ((IWDAbstractInputField) element).bindingOfValue();
if (element instanceof IWDCaption)
return ((IWDCaption) element).bindingOfText();
if (element instanceof IWDCheckBox)
return ((IWDCheckBox) element).bindingOfChecked();
if (element instanceof IWDLink)
return ((IWDLink) element).bindingOfText();
if (element instanceof IWDProgressIndicator)
return ((IWDProgressIndicator) element).bindingOfPercentValue();
if (element instanceof IWDRadioButton)
return ((IWDRadioButton) element).bindingOfSelectedKey();
if (element instanceof IWDTextEdit)
return ((IWDTextEdit) element).bindingOfValue();
if (element instanceof IWDTextView)
return ((IWDTextView) element).bindingOfText();
<b>if (element instanceof IWDImage)
return ((IWDImage) element).bindingOf<<u>yourChoice</u>>();</b>
return null;
}

Bala

Former Member
0 Kudos

Thank You Very much Bala. It solved my problem.

--Vivek

Answers (0)