From: Jonatan Kronqvist Date: Fri, 26 Aug 2011 07:59:45 +0000 (+0000) Subject: Better fix for #7143 X-Git-Tag: 6.7.0.rc1~121 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f0f22a21756e58582bbbaefbb04f60d951c03e26;p=vaadin-framework.git Better fix for #7143 svn changeset:20679/svn branch:6.7 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java index d43e1d423a..1195e3d8d8 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java @@ -2642,8 +2642,10 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, } public void setExpandRatio(float floatAttribute) { + if (floatAttribute != expandRatio) { + triggerLazyColumnAdjustment(false); + } expandRatio = floatAttribute; - triggerLazyColumnAdjustment(false); } public float getExpandRatio() { @@ -2838,6 +2840,11 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, if (!updated.contains(cid)) { removeCell(cid); cit.remove(); + // we will need a column width recalculation, since columns + // with expand ratios should expand to fill the void. + initializedAndAttached = false; + initialContentReceived = false; + isNewBody = true; } } } diff --git a/tests/src/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java b/tests/src/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java index 36299cad96..007c93573f 100644 --- a/tests/src/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java +++ b/tests/src/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java @@ -14,6 +14,7 @@ public class HiddenColumnsExpandRatios extends TestBase { @Override protected void setup() { final Table table = new Table(); + table.setColumnCollapsingAllowed(true); table.setWidth("800px"); addComponent(table); table.addContainerProperty("foo", String.class, "");