Hi,
I want to integrate a MenuBar with MenuItems. Clicking on one MenuItem should change the View, similar to the showDetails Button in the samples.
In the MasterViewController
@FXML
@FXMLFlowAction("menuItemPersonNew")
private MenuItem menuItemNew;
@FXML
@FXMLFlowAction("showDetails")
private Button showDetailsButton;
I added a new .withLink method to the flow, but when I click the menuItem, nothing happens:
Flow flow = new Flow(MasterViewController.class)
.withLink(MasterViewController.class, "showDetails", PersonViewController.class)
.withLink(MasterViewController.class, "menuItemPersonNew", PersonViewController.class)
@MasterView.fxml
<MenuBar layoutY="2.0" prefHeight="25.0" prefWidth="1000.0">
<menus>
<Menu fx:id="menuPatients" mnemonicParsing="false" text="Patienten">
<items>
<MenuItem fx:id="menuItemNew" mnemonicParsing="false" text="Neu" />
</items>
</Menu>
</menus>
</MenuBar>
Is it possible to do add MenuItems with the Flow concept and what could be my mistake?
Thanks for your appreciate help