я наткнулся на следующий вопрос: У меня есть следующие JSF боб:JSF свойство инициализации
public class MailingBean {
private RecipientService<?> recipientService;
private SearchRecipientController searchRecipientController = new SearchRecipientController(recipientService);
//Stuff, GET, SET
}
Это Бина intialized в faces-config.xml
следующим образом:
<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>
В редеет, когда new SearchRecipientController(recipientService)
является вызывающий, recipientService
- null. Можно ли каким-либо образом указать порядок инициализации? Или как я могу это исправить?
У вас есть сеттер для свойства 'recipientService'? – NeplatnyUdaj
@NeplatnyUdaj Вы правы. Спасибо. – user3663882
@NeplatnyUdaj Конечно, делаю. Я просто не писал их явно. – user3663882