Rene Reitmann created MYFACES-3592:
--------------------------------------
Summary: Injection of Spring Bean into ViewScoped ManagedBean is
not working
Key: MYFACES-3592
URL: https://issues.apache.org/jira/browse/MYFACES-3592
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.1.8
Environment: Tomcat 7.0.12, JDK 1.6.0_33
Reporter: Rene Reitmann
When I use the following code to inject a Spring Bean into my ViewScoped
ManagedBean then the reference to the Spring Bean is always null:
@ManagedBean
@ViewScoped
public class CreateOwnerBean implements Serializable {
//inject Spring Bean
@ManagedProperty(value = "#{ownerManagementService}")
private transient OwnerManagementService ownerManagementService;
public void setOwnerManagementService(
OwnerManagementService ownerManagementService) {
this.ownerManagementService = ownerManagementService;
}
}
I use org.springframework.web.jsf.el.SpringBeanFacesELResolver as EL Resolver.
The code works as expected when I use Mojarra.
With MyFaces it only works if I change my ManagedBean to be SessionScoped.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira