webtier@glassfish.java.net

Re: JSF recalls datatable on POST

From: <webtier_at_javadesktop.org>
Date: Thu, 27 Aug 2009 01:28:28 PDT

Well, I had a look at the source of UIData and you are right. But reevaluating the table's value is stated to be intended for some reason.

However it is never a good idea to load values in a getter method, because most getter methods are evaluated twice during request lifecycle. A common pattern is to initialize the data list during an action or on creation of the holding bean and just returning the result in the getter.

BR, Sven
[Message sent by forum member 'tzwoenn' (tzwoenn_at_gmx.de)]

http://forums.java.net/jive/thread.jspa?messageID=362111