Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 95645 invoked from network); 3 Nov 2004 09:32:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Nov 2004 09:32:15 -0000 Received: (qmail 34116 invoked by uid 500); 3 Nov 2004 09:31:37 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 33952 invoked by uid 500); 3 Nov 2004 09:31:36 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 33939 invoked by uid 99); 3 Nov 2004 09:31:36 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,TO_ADDRESS_EQ_REAL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of jh@schaubroeck.be designates 193.75.212.6 as permitted sender) Received: from [193.75.212.6] (HELO mail2.schaubroeck.be) (193.75.212.6) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 03 Nov 2004 01:31:34 -0800 Received: (from root@localhost) by mail2.schaubroeck.be (8.12.3/8.12.3/ESMTP) id iA39VVX3022061 for users@cocoon.apache.org; Wed, 3 Nov 2004 10:31:31 +0100 Received: from [193.74.194.207] ([193.74.194.207]) by mail2.schaubroeck.be (8.12.3/8.12.3/ESMTP) with ESMTP id iA39VHiG022009 for ; Wed, 3 Nov 2004 10:31:17 +0100 Message-ID: <4188A564.9010002@schaubroeck.be> Date: Wed, 03 Nov 2004 10:31:16 +0100 From: Jan Hoskens User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "users@cocoon.apache.org" Subject: Forms, writing extra info Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scan: by Schaubroeck X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, I have several cforms that connect to xml documents. These may contain default values. If a user changes a value, an attribute changed will be set on that value-element and on the document-element. To accomplish this, I have to set javascript bindings for each value looking like: widget.setValue(jxpathPointer.getValue()); var formValue = widget.getValue() == null ? new java.lang.String(""): new java.lang.String(widget.getValue()); if ( !jxpathPointer.getValue().equals(formValue)){ jxpathPointer.setValue(formValue); jxpathContext.createPathAndSetValue("@changed", "true"); jxpathContext.createPathAndSetValue("/document_root/@changed", "true"); } Is there a better way to do the same? Kind Regards, Jan --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org