This entry was posted on December 19, 2007 at 8:52 am and is filed under Developer, Java.
.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
5 Responses to “Annotate JSF Beans with Spring 2.5”
Yes, @Controller will work too but afaik it’s for Spring MVC framework and methods of a class annotated with @Controller are scanned for request mappings. You dont need that in JSF. @Component is simpler and enough.
December 20, 2007 at 2:44 pm
Any idea whether there is a difference between:
# @Component
# @Scope(”request”)
# @Qualifier(”saveDVDBean”)
and:
@Controller(”clientSI”)
@Scope(”request”)
public class ClientSI extends BaseSI implements BaseSIIntf {
@Resource(name = “clientManager”)
public void setManager(ClientManager manager) {
this.manager = manager;
}
At least my managed bean seem to work but I am very confused with all those annotations
December 20, 2007 at 3:11 pm
Yes, @Controller will work too but afaik it’s for Spring MVC framework and methods of a class annotated with @Controller are scanned for request mappings. You dont need that in JSF. @Component is simpler and enough.
December 22, 2007 at 10:23 am
wow… Spring is just like Seam. Never thought this would happen after all the JBoss vs Spring wars.
January 29, 2008 at 7:38 pm
great!
… but how do I replace the stuff from the faces-config with spring annotations?
e.g.
saveDVDBean
…
request
id
#{param.id}
thanx!
January 29, 2008 at 7:42 pm
sorry… the manged bean stuff is not displayed as desired… next try:
saveDVDBean
...
request
id
#{param.id}