Browse Source

Fixed Table to change child element style names when primary stylename is changed #9724

tags/7.0.0.beta6
John Ahlroos 11 years ago
parent
commit
76b0655b29
1 changed files with 14 additions and 2 deletions
  1. 14
    2
      client/src/com/vaadin/client/ui/table/VScrollTable.java

+ 14
- 2
client/src/com/vaadin/client/ui/table/VScrollTable.java View File

@@ -555,6 +555,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets,

@Override
public void setStyleName(String style) {
updateStyleNames(style, false);
}

@Override
public void setStylePrimaryName(String style) {
updateStyleNames(style, true);
}

private void updateStyleNames(String newStyle, boolean isPrimary) {
scrollBodyPanel
.removeStyleName(getStylePrimaryName() + "-body-wrapper");
scrollBodyPanel.removeStyleName(getStylePrimaryName() + "-body");
@@ -564,7 +573,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
+ "-body-noselection");
}

super.setStyleName(style);
if (isPrimary) {
super.setStylePrimaryName(newStyle);
} else {
super.setStyleName(newStyle);
}

scrollBodyPanel.addStyleName(getStylePrimaryName() + "-body-wrapper");
scrollBodyPanel.addStyleName(getStylePrimaryName() + "-body");
@@ -577,7 +590,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
}
}


public void init(ApplicationConnection client) {
this.client = client;
// Add a handler to clear saved context menu details when the menu

Loading…
Cancel
Save