Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location not set if the view in a different package from the App class. #53

Open
asifmohammed opened this issue Feb 8, 2018 · 4 comments
Assignees

Comments

@asifmohammed
Copy link

I keep gettingjava.lang.IllegalStateException: Location is not set. If I have my view in a different package from the App class

@usaaama2010
Copy link

Im getting the same issue

@Pyknic
Copy link
Contributor

Pyknic commented Mar 10, 2018

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:

screenshot at 2018-03-10 13-00-42

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);

@roskenet
Copy link
Owner

Something seems to be broken...
Should behave in different way.
Will verify this...

@roskenet roskenet self-assigned this Mar 12, 2018
@mtbadi39
Copy link

Same issue !!
@Pyknic structure and naming worked for me, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants