Greg Sheremeta has posted comments on this change.

Change subject: userportal, webadmin: make column width persistent
......................................................................


Patch Set 4:

(5 comments)

....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
Line 219:         // Default to 'no items to display'
Line 220:         this.table.setEmptyTableWidget(new NoItemsLabel());
Line 221: 
Line 222:         // column resizing persistence -- can be enabled only when 
the tableHeader widget is visible
Line 223:         if (!showDefaultHeader) {
Done
Line 224:             tableHeader.enableColumnWidthPersistence(clientStorage, 
dataProvider.getModel());
Line 225:             table.enableColumnWidthPersistence(clientStorage, 
dataProvider.getModel());
Line 226:         }
Line 227: 


Line 221: 
Line 222:         // column resizing persistence -- can be enabled only when 
the tableHeader widget is visible
Line 223:         if (!showDefaultHeader) {
Line 224:             tableHeader.enableColumnWidthPersistence(clientStorage, 
dataProvider.getModel());
Line 225:             table.enableColumnWidthPersistence(clientStorage, 
dataProvider.getModel());
I think this was your original suggestion. But this is what happens: 
http://i.imgur.com/uG9cSRq.png
The columns end up not matching the header sizes. I spent several hours tracing 
and digging, and came to the conclusion that I needed to enable it on the table 
as well.
Line 226:         }
Line 227: 
Line 228:     }
Line 229: 


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java
Line 36:     private static final int DEFAULT_MINIMUM_COLUMN_WIDTH = 30;
Line 37: 
Line 38:     private int minimumColumnWidth = DEFAULT_MINIMUM_COLUMN_WIDTH;
Line 39: 
Line 40:     // Prefix for keys used to store refresh rates of individual data 
grids
Done
Line 41:     private static final String GRID_COLUMN_WIDTH_PREFIX = 
"GridColumnWidth"; //$NON-NLS-1$
Line 42: 
Line 43: 
Line 44:     // Empty, no-width column used with resizable columns feature


Line 224:     }
Line 225: 
Line 226:     @Override
Line 227:     public void setColumnWidth(Column<T, ?> column, String width) {
Line 228:         if (!initializedColumns.contains(column) && 
columnResizePersistenceEnabled) {
completely agree. done.
Line 229:             String persistedWidth = readColumnWidth(column);
Line 230:             if (persistedWidth != null) {
Line 231:                 width = persistedWidth;
Line 232:             }


Line 324:     public void enableColumnWidthPersistence(ClientStorage 
clientStorage, GridController gridController) {
Line 325:         this.clientStorage = clientStorage;
Line 326:         this.gridController = gridController;
Line 327:         if (clientStorage != null && gridController != null) {
Line 328:             columnResizePersistenceEnabled = true;
thanks.
Line 329:         }
Line 330:     }
Line 331: 
Line 332:     protected String getColumnWidthKey(Column<T, ?> column) {


-- 
To view, visit http://gerrit.ovirt.org/17118
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I761e12de743fc9b5fce9edf52b929200abe25c8c
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to