[jboss-user] [JBoss Seam] - Newbie question

francof do-not-reply at jboss.com
Thu Jul 26 10:33:02 EDT 2007


Trying to understand  @Out 


I have this code

@Out(required=true)
private List catalogs;

@Factory
	@SuppressWarnings("unchecked")
	public void getCatalogs() {
		catalogs = em.createQuery("select catalog from Catalog catalog").getResultList();
	}


The documentation I read says that if I have a factory method operating on my field catalogs, it should be annotated with
@Out(required=false)

My code still works, so I can't understand the difference. 
Annotation help for required on @Out says
"Specifies that the outjected value must not be null, by default."

Not getting it here, does that mean if the value is null, a new object of that type will be created ?

Also not real sure of use of Factory methods. Let's say when User A first hits the page, the factory method would populate the list.  User B is also making changes on this page, how will user A see these changes if factory method is called only once. Should I program instead an init method using page.xml ?



Thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067831#4067831

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067831



More information about the jboss-user mailing list