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

Bug 427324

Summary: [Tree][Table] Column order is not sent as part of the protocol
Product: [RT] RAP Reporter: Ian Bull <irbull>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rsternberg, tbuschto
Version: unspecified   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Mac OS X   
Whiteboard: protocol

Description Ian Bull CLA 2014-02-03 15:23:59 EST
If columns are reordered, the order is not sent as part of the protocol. Instead they must be determined by looking at either the itemMetrics or the left / width values in columns.
Comment 1 Ralf Sternberg CLA 2014-02-04 09:42:50 EST
In a discussion with Ivan, we agreed that the columnOrder should be part of the protocol. However, since protocol properties have to be preserved and compared with every request, we should avoid any redundancy with the clientMetrics property.

For example, the first element (index) in itemMetrics seems to be redundant if this array contains the columns in index order. If the second and third parameter are always identical with the column's left and width properties, it would also be redundant. 

    itemMetrics=[[0, 0, 40, 0, 0, 0, 39], [1, 100, 90, 100, 0, 100, 89], [2, 630, 140, 630, 0, 630, 139], [3, 540, 90, 540, 16, 556, 73], [4, 40, 60, 40, 16, 56, 43], [5, 190, 350, 190, 0, 190, 349]]
Comment 2 Tim Buschtoens CLA 2014-02-04 09:51:51 EST
The itemMetrics were always pretty unreadable. Shouldn't these information be attached to the column objects? 

And while we are at it, shouldn't the values all be relative instead of absolute? That way we can calculate the actual text/image positions on the client and don't need to wait for the server for re-layouts.
Comment 3 Ralf Sternberg CLA 2014-02-04 10:42:52 EST
(In reply to Tim Buschtoens from comment #2)
> The itemMetrics were always pretty unreadable. Shouldn't these information
> be attached to the column objects?

I'd say yes, but it depends on the role of the GridColumn (?) objects in the protocol. Do they represent the entire column or only the column header?

> And while we are at it, shouldn't the values all be relative instead of
> absolute? That way we can calculate the actual text/image positions on the
> client and don't need to wait for the server for re-layouts.

+1 for relative positions!
Comment 4 Ivan Furnadjiev CLA 2014-08-14 07:15:17 EDT
Fixed in master with change https://git.eclipse.org/r/31263