This content has been marked as final.
Show 2 replies
-
1. Re: DataTable invokes bean one time too much
matt.drees Jan 26, 2008 9:28 PM (in response to qpool.char)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. -
2. Re: DataTable invokes bean one time too much
qpool.char Jan 28, 2008 2:39 PM (in response to qpool.char)Yes, thx a lot, this works!