diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-15 22:48:50 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-12-15 23:18:58 +0200 |
commit | ea1d229c70fa2e9edc63b234c483c36ee6114a29 (patch) | |
tree | b6ca1636f23acf8c6275627a24fe4477be550016 /server/src/com/vaadin/ui/TabSheet.java | |
parent | bac6b9599bce821d3cb554aa4ccb729e956493ee (diff) | |
download | vaadin-framework-ea1d229c70fa2e9edc63b234c483c36ee6114a29.tar.gz vaadin-framework-ea1d229c70fa2e9edc63b234c483c36ee6114a29.zip |
Handle tab indexes in a generic way (#7749)
Change-Id: I6e449ed7fd0acaf683da98ae3fcf55ff544c3b48
Diffstat (limited to 'server/src/com/vaadin/ui/TabSheet.java')
-rw-r--r-- | server/src/com/vaadin/ui/TabSheet.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index 442be21825..ef3ef80960 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -1464,8 +1464,6 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, @Override public void readDesign(Element design, DesignContext designContext) { super.readDesign(design, designContext); - // handle tab index - readTabIndex(design); // clear old tabs removeAllComponents(); // create new tabs @@ -1478,15 +1476,6 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, } } - private void readTabIndex(Element design) { - // Could be in AbstractComponent as if (this implements Focusable) - if (design.hasAttr("tabindex")) { - setTabIndex(DesignAttributeHandler.readAttribute("tabindex", - design.attributes(), Integer.class)); - } - - } - /** * Reads the given tab element from design * @@ -1609,7 +1598,6 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, @Override protected Collection<String> getCustomAttributes() { Collection<String> attributes = super.getCustomAttributes(); - attributes.add("tabindex"); // no need to list tab attributes since they are considered internal return attributes; } @@ -1625,9 +1613,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, super.writeDesign(design, designContext); TabSheet def = (TabSheet) designContext.getDefaultInstance(this); Attributes attr = design.attributes(); - // handle tab index - DesignAttributeHandler.writeAttribute("tabindex", attr, getTabIndex(), - def.getTabIndex(), Integer.class); + // write tabs for (Component component : this) { Tab tab = this.getTab(component); |