aboutsummaryrefslogtreecommitdiffstats
path: root/client/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/com')
-rw-r--r--client/src/com/vaadin/client/ui/VScrollTable.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java
index 3b85356f86..5bd6ed390d 100644
--- a/client/src/com/vaadin/client/ui/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/VScrollTable.java
@@ -2808,6 +2808,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
public void setSortable(boolean b) {
sortable = b;
+ /*
+ * Should in theory call updateStyleNames here, but that would just
+ * be a waste of time since this method is only called from
+ * updateCellsFromUIDL which immediately afterwards calls setAlign
+ * which also updates the style names.
+ */
}
/**
@@ -2881,6 +2887,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
setStyleName(primaryStyleName + "-header-cell");
}
+ if (sortable) {
+ addStyleName(primaryStyleName + "-header-sortable");
+ }
+
final String ALIGN_PREFIX = primaryStyleName
+ "-caption-container-align-";
@@ -3648,6 +3658,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
c.setSortable(false);
}
+ // The previous call to setSortable relies on c.setAlign calling
+ // c.updateStyleNames
if (col.hasAttribute("align")) {
c.setAlign(col.getStringAttribute("align").charAt(0));
} else {