-
Notifications
You must be signed in to change notification settings - Fork 83
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
Injection context ignored for presenter members at first #71
Comments
I have the same problem. It works for primitive types or strings (because of https://github.com/AdamBien/afterburner.fx/blob/master/src/main/java/com/airhacks/afterburner/injection/Injector.java#L145) but not for custom/complex objects. |
I am havin the same issue in my project. |
6 tasks
tobiasdiez
added a commit
to tobiasdiez/afterburner.fx
that referenced
this issue
Oct 22, 2017
… inital presenter initialization
mduffin95
added a commit
to mduffin95/afterburner.fx
that referenced
this issue
Jan 14, 2019
Fix for AdamBien#71 and AdamBien#78: Use injection context already on inital presente…
dlemmermann
added a commit
to dlsc-software-consulting-gmbh/afterburner.fx
that referenced
this issue
Aug 20, 2020
…ien#78: Use injection context already on inital presenter initialization AdamBien#80
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to instantiate a view
with provided injection context.
ValuePresenter
has a memberCriterium criterium
wgich should be injected the instance supplied by the context. But instead I get an exception, becauseCriterium
has no no-args-constructor. Instead of using the injection contexttries an injection of the presenter and subsequently an injection of members. All without usage of the context.
Later
instantiatePresenter(Class<T>, Function<String, Object>)
loops over the members again and then (but too late) uses the injection context.I can work around by using setters on the presenter, or supplying a no-args-constructor for
Criterium
, that way criterium would be replaced by the supplied instance later (but that feels wrong).Is it working as intended?
The text was updated successfully, but these errors were encountered: