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

Inconsistence between Java and FXML views when no VM type is specified #319

Closed
manuel-mauky opened this issue Nov 3, 2015 · 2 comments
Closed

Comments

@manuel-mauky
Copy link
Collaborator

With the @InjectViewModel annotation you can only inject a ViewModel into the View when the type of the to-be-injected ViewModel matches the generic type of the View. Something like this isn't possible:

public class MyView implements FxmlView<TestViewModelA> {
    @InjectViewModel
    private TestViewModelB viewModel; // wrong type
}

However, when the View has no generic type defined for the ViewModel the behaviour is different for FxmlViews and JavaViews at the moment.
In the case of FxmlView the same exception is thrown that is thrown on wrong ViewModel type.
In the case of JavaView no exception is thrown.

To fix this we need to change the behaviour of JavaView loading process and throw an exception in this case.

@sialcasa
Copy link
Owner

@lestard can this issue be closed?

@manuel-mauky
Copy link
Collaborator Author

@sialcasa done

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

No branches or pull requests

2 participants