Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095892

Load tab content on selection (focus)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P4 P4
    • None
    • 8u20
    • javafx

      related https://javafx-jira.kenai.com/browse/RT-35765

      When a tab is selected and loading the content is enabled by using getContent().requestFocus() only the content of the first selected tab is loaded. Selecting other tabs on the tabPane leaves their content empty.

      Patch for class TabPaneSkin:
      @@ -229,6 +229,9 @@
                   previousSelectedTab = selectedTab;
                   selectedTab = getSkinnable().getSelectionModel().getSelectedItem();
                   getSkinnable().requestLayout();
      + // PATCH: we need to setVisible() on selected tab, layoutChildren() does this
      + // there is another invocation of layout() at some point in the near future but too late for the focusProperty() to work properly
      + getSkinnable().layoutChildren();
               } else if ("SIDE".equals(property)) {
                   updateTabPosition();
               } else if ("WIDTH".equals(property)) {

            msladecek Martin Sládeček
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: