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

Initialize method never called without setting fx:controller in .fxml #66

Open
mtbadi39 opened this issue Apr 17, 2018 · 2 comments
Open

Comments

@mtbadi39
Copy link

Without setting fx:controller="someController" in the .fxml file, the initialize method never called !
So what the utility of the @FXMLController annotation.

@roskenet
Copy link
Owner

This is true. This annotation includes (as you see in the code) at the moment only the @component annotation, to 'component scan' it as a Spring Bean. We "invented" this annotation to
a) have a bit of semantic
b) be safe in the future to add some fields there.

@roskenet
Copy link
Owner

Feel free to implement a convention for 'auto detecting' a controller from a bean. (In fact we haven't done this, because we could not agree on whether this should be called XYZController or XYZPresenter) ;-)

@mtbadi39 mtbadi39 changed the title initialize method never called without setting fx:controller in fxml Initialize method never called without setting fx:controller in fxml Apr 19, 2018
@mtbadi39 mtbadi39 changed the title Initialize method never called without setting fx:controller in fxml Initialize method never called without setting fx:controller in .fxml Apr 19, 2018
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

2 participants