Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 58814 invoked from network); 5 Mar 2008 22:43:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2008 22:43:28 -0000 Received: (qmail 36044 invoked by uid 500); 5 Mar 2008 22:43:21 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 35998 invoked by uid 500); 5 Mar 2008 22:43:21 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 35987 invoked by uid 99); 5 Mar 2008 22:43:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2008 14:43:21 -0800 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of delbd+jakarta@oma.be does not designate 195.238.6.173 as permitted sender) Received: from [195.238.6.173] (HELO mailrelay007.isp.belgacom.be) (195.238.6.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2008 22:42:45 +0000 X-Belgacom-Dynamic: yes Received: from 46.208-177-91.adsl-dyn.isp.belgacom.be (HELO [10.0.0.4]) ([91.177.208.46]) by relay.skynet.be with ESMTP; 05 Mar 2008 23:42:55 +0100 Message-ID: <47CF21EF.4040904@oma.be> Date: Wed, 05 Mar 2008 23:42:55 +0100 From: david delbecq User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: help me decide when to populate my datatable? References: <1204750732.6329.28.camel@simon-laptop> In-Reply-To: <1204750732.6329.28.camel@simon-laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org simon a �crit : > Yes, it's a common issue. > > In JSF 1.2 it is possible to detect whether a postback is in progress. > In your case, if you know that there are no editable fields then you > could then just return null, or an empty list. Of course you then need > to go back to really fetching data in the render phase, but the setters > methods for your search criteria should be able to trigger that. > > I agree it's ugly, and there should really be a nicer solution. I don't > know of one though. > If i remember well, tomahawk datatable has preserveModel. This one ensure that the model during apply request values and all other phases before render is the same as the one done during previous render. The value Expression is not used until you again reach render phase. However, that mean the model used during render is stored in session, with all implications of such behaviour (session values should be made serializable, memory is use to preserve this states, hibernate session might get disconnected and lazy loading fails, etc)