[jboss-user] [JBoss Seam] - Re: What to do to make @Factory method working?
Andy Gibson
do-not-reply at jboss.com
Sun Dec 2 20:23:33 EST 2007
Do you have your bean setup as a seam component with a @Name annotation? It should be like :
| @Name("articleManager")
| @Scope(ScopeType.Conversation)
| public class ArticlesManagerBean ....... {
|
| @Factory("article")
| public Article getArticle() {
| <init code if necessary>
| return article
| }
| }
|
Can you reference your bean from the page?
Try putting in something like :
| <h:outputText value="#{articlesManager}"/>
|
to see if it can pick up your articles manager bean.
Also, is your getArticles() method defined in your interface that the bean implements?
Other than that, if you post some code, it should be easy to spot. Did you create the app with Seam Gen, and if not, do you have anything working that would indicate whether the app is set up properly?
Cheers,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109687#4109687
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109687
More information about the jboss-user
mailing list