I am writing a (composite) component that needs to interact with my DAO. Here is how the Java part is declared:
@FacesComponent(value="selectLocation")
public class SelectLocation extends UINamingContainer {
To get the DAO object, I tried the CDI annotation:
@Inject private LocationControl lc;
And that didn't work so I tried the Faces annotation:
@ManagedProperty (value = "@{locationControl}") private LocationControl lc;
Both cases nothing happens -- the property lc ends up as null after the constructor finishes.
I use CDI in all my backing beans and it all works. This would be using Weld inside GlassFish 3.1.1. Any suggestions on how to get the resource?