"pnorman4" wrote : The result is that facesContext is injected 4 times - twice
for each #{testBean.testValue}. Adding another #{testBean.testValue} will force
two more injections!
|
| The #{testValue} on the other hand does not enforce any injections.
Each time that you call a method on your Seam component, Seam will biject as
required. When the method is complete Seam disinjects the any injections. So,
each time you call #{testBean.testValue}, you get an injection. As for why
each #{testBean.testValue} causes two injections, that's probably down to
JSF/Facelets evaluating the binding twice.
By the time you access #{testValue} on your page it has been outjected by
testBean and so exists as a contextual variable and hence doesn't access the
bean at all.
anonymous wrote :
| Now I wonder:
| * Is this behavior a bug?
Why do you wonder that?
anonymous wrote : * Do I get this behaviour because I'm using JavaBeans instead
of EJB3 SessionBeans?
No.
anonymous wrote : Also:
| * To get the @Out outjection to work, I must first access the bean (with
#{testBean.testValue} for instance). Is there another way to "wake up" the bean
so that @Out works?
Look at using @Factory or @Create (there are examples of both in examples
directory.
In general we (Gavin) have done a very good job of making Seam fast - there are
discussions about this on the forum, take a look through. The normal candidate
for slowness is in your use of the ORM.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040391#4040391
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040391
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user