[jboss-user] [JBoss Seam] - Facotry-session and bean-conversation
yohann49
do-not-reply at jboss.com
Fri Sep 7 05:45:23 EDT 2007
Hello !
I was wondering if it could be possible to have a bean wich his scope is CONVERSATION and a fctory in this bean whis his scope is SESSION. I want to do that but when I want to go to the xhtml page, I have this exception :
Exception during request processing: javax.servlet.ServletException: factory method with defined scope outjected a value: orders
My bean :
|
| @Stateful
| @Name("ListOrder")
| @Scope(CONVERSATION)
| public class OrderManager implements OrderManagerLocal, Serializable {
|
| @DataModel("orders") List<Order> orders;
|
| @Factory(value="orders", scope = SESSION)
| public void findOrder(){
|
| Query query;
|
| query = em.createQuery("select o from Order o where o.customer=#{currentContact.customer}");
|
|
| orders = (List<Order>) query.getResultList();
|
|
| }
| }
|
Thanks Yohann
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082041#4082041
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082041
More information about the jboss-user
mailing list