Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 45714 invoked from network); 6 Nov 2003 10:33:40 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Nov 2003 10:33:40 -0000 Received: (qmail 70701 invoked by uid 500); 6 Nov 2003 10:33:10 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 70662 invoked by uid 500); 6 Nov 2003 10:33:10 -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 Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 70649 invoked from network); 6 Nov 2003 10:33:09 -0000 Received: from unknown (HELO ags01.agsoftware.dnsalias.com) (216.6.48.60) by daedalus.apache.org with SMTP; 6 Nov 2003 10:33:09 -0000 Received: from ags01.agsoftware.dnsalias.com (localhost [127.0.0.1]) by ags01.agsoftware.dnsalias.com (8.12.8/8.12.8) with ESMTP id hA6AXMIc024475 for ; Thu, 6 Nov 2003 04:33:22 -0600 Received: (from apache@localhost) by ags01.agsoftware.dnsalias.com (8.12.8/8.12.8/Submit) id hA6AXM5h024473; Thu, 6 Nov 2003 04:33:22 -0600 X-Authentication-Warning: ags01.agsoftware.dnsalias.com: apache set sender to agallardo@agsoftware.dnsalias.com using -f Received: from 10.0.0.5 (SquirrelMail authenticated user agallardo) by ags01.agsoftware.dnsalias.com with HTTP; Thu, 6 Nov 2003 04:33:22 -0600 (CST) Message-ID: <36113.10.0.0.5.1068114802.squirrel@ags01.agsoftware.dnsalias.com> Date: Thu, 6 Nov 2003 04:33:22 -0600 (CST) Subject: Re: [Woody-binding] wb:repeater unique-path From: "Antonio Gallardo" To: In-Reply-To: <1068110481.2380.58.camel@yum.ot> References: <35107.10.0.0.5.1068054707.squirrel@ags01.agsoftware.dnsalias.com> <1068058622.2380.39.camel@yum.ot> <1068060651.2381.42.camel@yum.ot> <1068110481.2380.58.camel@yum.ot> X-Priority: 3 Importance: Normal X-Mailer: SquirrelMail (version 1.2.11) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Bruno Dumon dijo: > On Wed, 2003-11-05 at 20:30, Bruno Dumon wrote: >> On Wed, 2003-11-05 at 19:57, Bruno Dumon wrote: >> > On Wed, 2003-11-05 at 18:51, Antonio Gallardo wrote: >> > > Hi: >> > > >> > > I am trying to do a "form.save(bean)" from an empty displayed >> form.I have 2 days with this sample and still not working. :-( >> > > >> > > >> > > My problem is that inside the "repeater" there is only 1 value >> (res_id) of datatype integer. >> > > >> > > Binding just save the first 2 values and an empty repeater. >> > >> > Is the res_id field a field that the user can edit? The current >> repeater-binding assumes that new rows are those with an empty id >> field (res_id your case). Thus if these are editable by the user and >> the user puts a value in them, the repeater binding will not detect >> that these are new rows. >> > >> > However, it is of course possible to implement alternative >> > repeater-binding strategies. One that's also available is >> > wb:simple-repeater (see javadoc of the class >> > SimpleRepeaterJXPathBindingBuilder). This binding works by first >> removing all items, and the adding all the items in the repeater. >> >> After having a look at the source code, I'm afraid that binding >> currently only works for XML documents. > > Sylvain, would you mind if I changed the simple-repeater binding so that > its configuration lines up more with that of the other repeater binding? > I'm thinking of something like this: > > > > ... > > > ... > > > > The wb:on-insert-row element would be optional, if not specified the > binding would work as it is now (ie rely on JXPath to create the path). I thought adding a new repeater will add more complexity to Cocoon forms. Better will be to add an attribute in that will allow the behavior or not. I propose something like: unique-change="true" [default false] If set to true, then the unique field can be changed. Is this correct? Best Regards, Antonio Gallardo