Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 28701 invoked from network); 13 Jul 2007 14:52:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2007 14:52:38 -0000 Received: (qmail 95524 invoked by uid 500); 13 Jul 2007 14:52:32 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 95487 invoked by uid 500); 13 Jul 2007 14:52:32 -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 95426 invoked by uid 99); 13 Jul 2007 14:52:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 07:52:32 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of andrew.rw.robinson@gmail.com designates 209.85.132.248 as permitted sender) Received: from [209.85.132.248] (HELO an-out-0708.google.com) (209.85.132.248) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 07:52:29 -0700 Received: by an-out-0708.google.com with SMTP id c3so127590ana for ; Fri, 13 Jul 2007 07:52:08 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JjUK21zG1KBAe7CjLj7XG/qI1YZTtUZark1hwGbl9BIr1xgQUrWRPzmpOE5vYbDuQX1nbjZw/AZ67mEr276QORk+su/TZqegG6eN3n1Mi0XWOBGxdtTA7NatKsXTZVdXp7vkwHmvefuAbAFh0w5IZD0QAPFIB7DHFtYpPvchioA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eY8ZKVCBJMhcWwv79GUTyrQHNlvyoDaSPOZCNMfh92Uulw8w8nxKbusVF9igLgVjXK1EYHthHjhmuFz7wulRPKlAk/UwIhM+0T+/cL21NLRqjhTLN5yOS/2I7Mmlf5ByBv21OvqOjrEomg0LoCgica3XjFmoZ1XAwPY9/CKavwA= Received: by 10.100.14.19 with SMTP id 19mr960103ann.1184338328517; Fri, 13 Jul 2007 07:52:08 -0700 (PDT) Received: by 10.100.191.4 with HTTP; Fri, 13 Jul 2007 07:52:08 -0700 (PDT) Message-ID: Date: Fri, 13 Jul 2007 08:52:08 -0600 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: Detecting whether or not the user changed anything on a form In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org If at least one ValueChangeEvent is queued (by a UIInput component) during the validation pahse, then something has changed. On 7/13/07, Hannum, Daniel wrote: > > > > > Hi, > > > > I have a form for editing a business entity. The form is prepopulated wit= h > the current values and the user can change everything and hit the submit > button when their done. Fairly simple. What's tricky is that I'd like to > only show a confirmation ("Changes saved") message if they actually chang= ed > something instead of just submitting the same values as before. > > > > The na=EFve way is to check each backing bean field against the field in = the > business entity, but that's unmaintainable when the object starts changin= g. > Is there a framework-based way to detect this? I want to avoid having to > enumerate every field when I check. I want to know that _at least one_ of > the fields on the page has a submitted value different from the model val= ue. > (I think I got the terminology right) > > > > Maybe the answer lies in a phase listener that would somehow do that chec= k, > my experience with that is limited. Please let me know if this is possibl= e > or not. > > > > And I'm using MyFaces and Trinidad so hopefully it would only use mechani= sms > include in those projects. > > > > Thanks > > Dan > > > ________________________________ > > > > > ***Note:The information contained in this message may be privileged and > confidential and protected from disclosure. If the reader of this message= is > not the intended recipient, or an employee or agent responsible for > delivering this message to the intended recipient, you are hereby notifie= d > that any dissemination, distribution or copying of this communication is > strictly prohibited. If you have received this communication in error, > please notify the Sender immediately by replying to the message and delet= ing > it from your computer. Thank you. Premier Inc.