| Dependency injection of fields [message #897075] |
Sat, 21 July 2012 09:18  |
 |
Markus Oley Messages: 227 Registered: July 2009 Location: Germany |
Senior Member |
|
|
Hi to anyone,
I have a Part and want to use dependency injection for inject some fields:
public class PreviewEditorPart {
@Inject
private PreviewEditorContent previewEditorContent
}
But somehow this is null if I want to do something in constructor.
If I add this to constructor and do a this.previewEditorContent = ...
it works, but I don't want to change signature.
Do I have another possibility to inject this?
Why isn't my field injected although I have a @Inject?
The constructor contains a reference to the mother - composite. Do I get this somehow by injection to avoid the necessary of having a constructor other than the default-constructor
Thank you for your help
Best regards
Markus
[Updated on: Sat, 21 July 2012 09:20] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03092 seconds