aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/Table.java
diff options
context:
space:
mode:
authorMarc Englund <marc.englund@itmill.com>2008-09-11 12:44:33 +0000
committerMarc Englund <marc.englund@itmill.com>2008-09-11 12:44:33 +0000
commit0bd4eba37b1bcceff7fb28eff9771811ed6a4199 (patch)
tree94570e528758e23819e7307bb20c278569300baa /src/com/itmill/toolkit/ui/Table.java
parentd5b6cabba7eaa595429b19e13e3cb233b87500fe (diff)
downloadvaadin-framework-0bd4eba37b1bcceff7fb28eff9771811ed6a4199.tar.gz
vaadin-framework-0bd4eba37b1bcceff7fb28eff9771811ed6a4199.zip
Force-table-to-recalculate-column-widths feature. Fixes #1983 (see ticket for more)
svn changeset:5389/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/Table.java')
-rw-r--r--src/com/itmill/toolkit/ui/Table.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java
index 0d22f641ad..d9421395f5 100644
--- a/src/com/itmill/toolkit/ui/Table.java
+++ b/src/com/itmill/toolkit/ui/Table.java
@@ -312,6 +312,12 @@ public class Table extends AbstractSelect implements Action.Container,
private int clickListenerCount;
+ /*
+ * EXPERIMENTAL feature: will tell the client to re-calculate column widths
+ * if set to true. Currently no setter: extend to enable.
+ */
+ protected boolean alwaysRecalculateColumnWidths = false;
+
/* Table constructors */
/**
@@ -1795,6 +1801,13 @@ public class Table extends AbstractSelect implements Action.Container,
rows = reqRowsToPaint;
} else {
rows = cells[0].length;
+ if (alwaysRecalculateColumnWidths) {
+ // TODO experimental feature for now: tell the client to
+ // recalculate column widths.
+ // We'll only do this for paints that do not originate from
+ // table scroll/cache requests (i.e when reqRowsToPaint<0)
+ target.addAttribute("recalcWidths", true);
+ }
}
if (!isNullSelectionAllowed() && getNullSelectionItemId() != null