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

Can't set controller in HelloworldJavaView demo #84

Open
yrcs opened this issue Dec 14, 2018 · 3 comments
Open

Can't set controller in HelloworldJavaView demo #84

yrcs opened this issue Dec 14, 2018 · 3 comments

Comments

@yrcs
Copy link

yrcs commented Dec 14, 2018

As the title say, there is the only one way to set the view's controller via "fx:controller" in fxml file and no way can set the controller via the pure java code.

@co5dt
Copy link

co5dt commented Feb 26, 2019

Found a solution?

@yrcs
Copy link
Author

yrcs commented Mar 7, 2019

Found a solution?
I am using mvvmfx, it can also work with Spring Boot.
https://github.com/sialcasa/mvvmFX

@balazsvero
Copy link

Since there was no answer for this for a long time: you can set either the controller or a controller factory in the FXMLLoader instance, but then you omit it in the .fxml file. As I saw, the controllerFactory is set in the view, so if you use this library, you don't have to set it in the .fxml

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

No branches or pull requests

3 participants