springboot-javafx-support
springboot-javafx-support copied to clipboard
Location not set if the view in a different package from the App class.
I keep gettingjava.lang.IllegalStateException: Location is not set.
If I have my view in a different package from the App class
Im getting the same issue
I had the same issue. The view has to be in the same package as the .fxml-file. The controller can be in a different package however. It is also important that the .fxml-files uses lowercase names. See this structure and naming:
I mostly use the view-classes as a marker for the location of the .fxml-file. It doesn't contain more than the @FXMLView
-annotation and a bundle. It is the controller-class that holds all logic.
@FXMLView(bundle="org.daaksord.kiosk.ui.i18n.cart", encoding = "UTF-8")
public final class CartView extends AbstractFxmlView {}
And to switch view:
MainApp.showView(CartView.class);
Something seems to be broken... Should behave in different way. Will verify this...
Same issue !! @Pyknic structure and naming worked for me, thanks 👍