on 05-22-2006 6:02 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.