Spring beans in JSF components
Hi!
Maybe a dumb question, but I figured somebody here might know the answer: I have a JSF application with Spring, Facelets and MyFaces. I'd like to write a custom JSF component now which would need to use a Spring bean. How do I inject it in the component?
As an example, I have a LinkBuilder service class which builds custom links. Rather than creating every URL I might need in my action class and storing it in a bean, I'd like to do something like this to output a link tag:
<my:link ... />
I'd probably extend the h:outputLink component here. But how do I get my service class, since the component instance is generated by JSF? Or does this simply not work?
Regards,
Johannes
Spring 2.5.6, Spring WebFlow 2.0.8, MyFaces 1.2.5, Facelets, JDK 1.6.0, Tomcat 6