9757 + Spring 2.5 + JSF 1.2
If the faces-config.xml is like this
<?xml version='1.0' encoding='UTF-8'?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
</application>
</faces-config>
and the applicationContext.xml is like this
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="kService" scope="session"/>
</beans>
then we can use the Spring bean in the EL like this
#{kService.time}
where KServiceImpl is
public class KohlsServiceImpl {
public Date getTime() {
return new Date(System.currentTimeMillis());
}
}
But Idea 9757 doesn't understand kService in ELs.
Please sign in to leave a comment.
It must work, is your applicationContext.xml added in fileset?
thank you. You're the man!
And sorry for taking your time for a stupid question.