Details
-
Bug
-
Resolution: Fixed
-
P4
-
8u20
-
None
-
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b17, mixed mode)
Description
Looking up a node with TabPane.lookupAll does not return any result.
This seems to be the caused by the children not being filled with the content nodes of the single tabs.
Maybe this is affects more nodes eg. like Accordion?
Test:
public void testLookup() throws Exception {
TabPane tabPane = new TabPane();
Tab tab1 = new Tab("tab1");
tabPane.getTabs().add(tab1);
StackPane content = new StackPane();
TextField nodeWithId = new TextField();
nodeWithId.setId("test");
content.getChildren().add(nodeWithId);
tab1.setContent(content);
assertSame(nodeWithId, content.lookup("#test"));
Set<Node> idNodes = tabPane.lookupAll("#test");
assertEquals(1, idNodes.size());
assertSame(nodeWithId, tabPane.lookup("#test"));
}
This seems to be the caused by the children not being filled with the content nodes of the single tabs.
Maybe this is affects more nodes eg. like Accordion?
Test:
public void testLookup() throws Exception {
TabPane tabPane = new TabPane();
Tab tab1 = new Tab("tab1");
tabPane.getTabs().add(tab1);
StackPane content = new StackPane();
TextField nodeWithId = new TextField();
nodeWithId.setId("test");
content.getChildren().add(nodeWithId);
tab1.setContent(content);
assertSame(nodeWithId, content.lookup("#test"));
Set<Node> idNodes = tabPane.lookupAll("#test");
assertEquals(1, idNodes.size());
assertSame(nodeWithId, tabPane.lookup("#test"));
}