I came across the following issue: I have the following JSF bean:
public class MailingBean {
private RecipientService<?> recipientService;
private SearchRecipientController searchRecipientController = new SearchRecipientController(recipientService);
//Stuff, GET, SET
}
That bean's intialized in the faces-config.xml
as follows:
<managed-bean>
<managed-bean-name>mailingBean</managed-bean-name>
<managed-bean-class>path.to.package.MailingBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>recipientService</property-name>
<value>#{playerService}</value>
</managed-property>
</managed-bean>
The thins is when new SearchRecipientController(recipientService)
is invoking, recipientService
is null. Is it possible to specify initialization order in some way? Or how can I fix that?