[jboss-user] [JBoss Seam] - Re: @Startup (possible to have this occur post session creat
courtneycouch
do-not-reply at jboss.com
Mon Apr 30 06:22:37 EDT 2007
"petemuir" wrote : "courtneycouch" wrote : The reason for this is that ajax4jsf mediaOutput components cant be seam component. They need to be simply managed-beans. When I'm using managed-beans in a seam application the regular lifecycle stuff for managed-beans doesnt work since seam is in control.
|
| This is something that is broken then - we/a4j ought to fix this as you should be able to use a Seam component here. Have you talked to the a4j guys about this?
|
| anonymous wrote : Kind of a hack I suppose.. the problem is fc.getApplication().getVariableResolver().resolveVariable() called from within a @Create method of a component tahts marked @Startup just starts an infinite loop.
|
| Well yes, this is a loop ;) I haven't got the whole picture here, but, for your workaround, why not lazy-initialize the proxy?
Here is the thread from the ajax4jsf users: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107203
Perhaps I misunderstood but I got the impression that ajax4jsf purposely doesnt operate in the way I'm trying "You can use the whole JSF lifecycle with restoring the session for each request to resources like this OR serialize only the required data and pass it directly to the method. " seems to imply that.
As far as lazy initializing, I need the managed-bean to have access to seam components, if its lazy initialized then its initialized outside of the seam context and cant access them. Seam has to initialize the managed beans so I have to create a seam component whose sole purpose is initializing the managed-beans. Since thats its only purpose, I simply have a #{managedBeanLoader.load} in the template.
Once the managed bean has a reference to a seam context its good to go..I was just hoping I could find a better way than call the seam component above on every seam request jsut to make sure that the managed-beans are instantiated from seam not ajax4jsf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041790#4041790
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041790
More information about the jboss-user
mailing list