-
1. Re: List Shuttle Customization!!!
deepusrp Aug 23, 2010 10:07 AM (in response to deepusrp)Hello All,
Within the tool's configuration i dont have no idea how to do the sorting.
But i have found a workaround to do that. I'll add Comparable<XYZ> to the entity XYZ. I just need to implement one method compareTo() which will do proper comparison.
So it'll look like
class XYZ implements Comparator<XYZ> {
....
@Override
public int compareTo(XYZ newObj) {
int xyzCmp = firstName.compareTo(newObj.firstName);return (xyzCmp!= 0 ? xyzCmp: lastName.compareTo(newObj.lastName));
}
}
I can call a method on the pageForm which will sort the lists:
public void sortXYZLists() {
List<XYZ> sourceList = getSourceXYZList();
Collections.sort(sourceList);
setSourceXYZList(sourceList);List<XYZ> targetList = getTargetXYZList();
Collections.sort(targetList);
setTargetXYZList(targetList);
}But now the problem is to trigger the action on the buttons provided on the listshuttle tool. Can we trigger some action when they click on 'Copy All' or anyother button. Please let me know how to add actions to the buttons.
Thanks
Deepak