Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 43707 invoked from network); 6 Dec 2005 10:59:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Dec 2005 10:59:41 -0000 Received: (qmail 12468 invoked by uid 500); 6 Dec 2005 10:59:38 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 12405 invoked by uid 500); 6 Dec 2005 10:59:37 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 12394 invoked by uid 99); 6 Dec 2005 10:59:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2005 02:59:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [194.109.24.30] (HELO smtp-vbr10.xs4all.nl) (194.109.24.30) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2005 02:59:36 -0800 Received: from [192.168.1.15] (a80-126-53-97.adsl.xs4all.nl [80.126.53.97]) by smtp-vbr10.xs4all.nl (8.13.3/8.13.3) with ESMTP id jB6AxEqg008776 for ; Tue, 6 Dec 2005 11:59:14 +0100 (CET) (envelope-from rob@robinwyles.com) Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: <12ad8943989836e84d9e137fbf15cbcc@robinwyles.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: dev@cocoon.apache.org From: Robin Wyles Subject: RepeaterJXPathBinding Date: Tue, 6 Dec 2005 12:02:52 +0100 X-Mailer: Apple Mail (2.623) X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi All, Up until recently I was able to have a repeater binding like this... [...] This would handle the loading, updating and deleting of rows in the repeater, but ignore newly added rows. This was neat because it meant I could use a second custom binding to handle the binding for newly added rows thus allowing me to bind collections containing objects of different classes. However after revision 349806 of RepeaterJXPathBinding.java this usage results in... org.apache.commons.jxpath.JXPathException: Cannot create a relative context for a non-existent node: /collection[8] at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getRelativeConte xt(JXPathContextReferenceImpl.java:581) at org.apache.cocoon.forms.binding.RepeaterJXPathBinding.doSave(RepeaterJXP athBinding.java:253) [...] Comparing this revision with the previous one I can see why the error is occurring - in the previous revision the new row context is not created if the insert binding does not exist, this is not the case in the latest revision. I've patched my copy which continues to work as expected for normal repeater bindings and my binding as outlined above. However I don't know enough about the binding framework to know if this change between the last revision was for a specific reason and whether my patch to revert the behaviour will break other things. Can someone take a look? Thanks, Robin