Hi, I try to inject a service into a application state creator, but when
create() is called, the service is not injected and I get a npe. But when I
inject this service into a page it works.

Here is my code:

public class FacetConfigurationsStateCreator implements
ApplicationStateCreator<Map<Facet, FacetConfiguration>>{

            @Inject
    private IFacetService facetService;

    @Override
    public Map<Facet, FacetConfiguration> create() { ..}

}

My AppModule:

    public void contributeApplicationStateManager(MappedConfiguration<Class,
ApplicationStateContribution> configuration)
    {

      configuration.add(Map.class, new
ApplicationStateContribution("session", new
FacetConfigurationsStateCreator()));
    }

Whats going wrong? Why gets the IFacetService not injected?

Reply via email to