I'm not sure if this is a bug because it looks like it is designed this way.
I just tried to do a TabPane.lookupAll("#myId") which does not return any result. This is because the TabPane doesn't add the Tabs(which are no nodes) to its children. If it would add the content of each pane to the children the lookup would work.
My solution right now is to scan the scenegraph myself.
It is just not that easy to determine when to use lookupAll and when to manually scan the scenegraph. Didn't yet check it but I think the same might apply to containers like Accordion.
Would be nice if somebody could give me some clarification.

Unit Test:
public class TabTest {
  public void testLookup() throws Exception {
    TabPane tabPane = new TabPane();
    Tab tab1 = new Tab("tab1");

    StackPane content = new StackPane();
    TextField nodeWithId = new TextField();

    assertSame(nodeWithId, content.lookup("#test"));
    Set<Node> idNodes = tabPane.lookupAll("#test");
    assertSame(nodeWithId, tabPane.lookup("#test"));

Reply via email to