Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347753

Summary: Table sort order not stored correctly
Product: z_Archived Reporter: Matthias Zimmermann <zimmermann>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matthias Zimmermann CLA 2011-05-31 06:25:51 EDT
PROBLEM DESCRIPTION:
Assuming a simple table column with no special configuration on a simple form. When the user sorts this column ascending and then closes and reopens the form, the sort order is restored automatically.

However, if the user descides to sort the column DESCENDING, the sort order is not saved correctly. When the form is reopened, the sort order is ASCENDING again.

EVALUATION:
ClientUiPreferences.setTableColumnPreferences() removes the TABLE_COLUMN_SORT_ASC key from the preferences when the sort order is not ascending. Because the preferences do not longer contain information about this column's sort order, the default column sort order is applied in getTableColumnSortAscending().

PROPOSED SOLUTION:
Set the key to "false" when the sort order is not ascending, instead of just removing the key. See patch.
Comment 1 Matthias Zimmermann CLA 2011-05-31 06:26:11 EDT
fixed on 2.5.2011, #99916
Comment 2 Matthias Zimmermann CLA 2011-06-28 09:10:41 EDT
shipped with eclipse scout 3.7.0