You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
publicclassMyViewimplementsFxmlView<TestViewModelA> {
@InjectViewModelprivateTestViewModelBviewModel; // 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.
The text was updated successfully, but these errors were encountered:
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: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.
The text was updated successfully, but these errors were encountered: