[jboss-user] [JBoss Seam] - Re: DataTable invokes bean one time too much

matt.drees do-not-reply at jboss.com
Sat Jan 26 21:28:58 EST 2008


anonymous wrote : Doesnt JSF just invoke this method one time and then create the datatable?
No, not necessarily.  You can't predict how often your method will be called, so in general, don't do a lot of stuff in getters.

I'd probably use a @DataModel and have your method populate it with a factory.  I think the docs show how to do this. 

This creates a request-scoped variable that jsf can call as often as it wants, but your factory method is only called once.


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

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



More information about the jboss-user mailing list