Refresh will destory the sorted table
Currently, if table is sorted and then do a refresh action. The sorted table
will be destroied and become unsorted. This is not good.
For example, when we do a download action on a sorted table. After it is done,
table will be refreshed. Then table become from sorted status to unsorted
status. So this datapackage probably go to another line. It is difficult to
find it back. So maybe we should keep same sorted status( unsorted or sorted
by some column and order) after refresh.
Updated by Jing Tao over 20 years ago
A new class named SortTableCommand was created. This can make the code
reusable. Then add a method named sortTable in ResultPanel class. This method
uses SortTableCommand to sort the table in ResulPanel.
In RefreshCommand class, first get the status of sort of previous resultPanel,
then sort the new resultPanel in the same way as it did.