Closed GoogleCodeExporter closed 8 years ago
I have the same problem:
I'm trying to inject a view with editors/renderers fields marked as @Inject
@UiField(provided=true) and then, an initialize method annotated with @Inject
should be called last to call initWidget() when all fields have been populated.
Xavier
Original comment by xavier.d...@gmail.com
on 28 Mar 2013 at 1:47
in com.google.gwt.inject.rebind.util.SourceWriteUtil.createMemberInjection(), I
think the 2 following lines should be inverted:
sb.append(createMethodInjections(getMethodsToInject(type), "injectee",
nameGenerator, methodsOutput));
sb.append(createFieldInjections(getFieldsToInject(type), "injectee",
nameGenerator, methodsOutput));
Original comment by xavier.d...@gmail.com
on 9 Apr 2013 at 2:03
Thanks. Created a patch with some tests internally.
Will let you know when it is released.
Original comment by gok...@google.com
on 9 Apr 2013 at 11:30
This issue was closed by revision r261.
Original comment by gin.mirr...@gmail.com
on 11 Apr 2013 at 2:22
Does it not make more sense to have field injection to happen as the first ?
Just like normal java objects construction normally does ?
Original comment by david.nouls
on 11 Apr 2013 at 6:57
@David I don't understand... how would you inject an object that has not been
constructed yet?
Original comment by xavier.d...@gmail.com
on 11 Apr 2013 at 7:27
I know, although it is counter intuitive that injected members are injected
after construction, when in normal java objects created with new the opposite
order is executed. I wish Java would somehow allow injection frameworks to step
in during the object initialization.
So just disregard my comment.
Original comment by david.nouls
on 11 Apr 2013 at 7:35
Original issue reported on code.google.com by
francois...@gmail.com
on 5 Oct 2012 at 10:20