Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 45194 invoked from network); 17 Feb 2005 20:37:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Feb 2005 20:37:55 -0000 Received: (qmail 44009 invoked by uid 500); 17 Feb 2005 20:37:51 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 43611 invoked by uid 500); 17 Feb 2005 20:37:49 -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 43597 invoked by uid 99); 17 Feb 2005 20:37:49 -0000 X-ASF-Spam-Status: No, hits=3.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,FORGED_YAHOO_RCVD,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mta7.srv.hcvlny.cv.net (HELO mta7.srv.hcvlny.cv.net) (167.206.5.74) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 17 Feb 2005 12:37:48 -0800 Received: from [192.168.15.100] (ool-44c16695.dyn.optonline.net [68.193.102.149]) by mta7.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0IC200DQ9PAXZJ@mta7.srv.hcvlny.cv.net> for users@cocoon.apache.org; Thu, 17 Feb 2005 15:37:45 -0500 (EST) Date: Thu, 17 Feb 2005 15:37:45 -0500 From: Alex Romayev Subject: Re: [CForms] Creating unique ids for new repeater rows In-reply-to: To: users@cocoon.apache.org Message-id: MIME-version: 1.0 X-Mailer: Apple Mail (2.619.2) Content-type: text/plain; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT References: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks Ben, this is exactly what I was looking for. Actually I form2_bind_xml.xml is the file I've been looking at and it's not in my version of it (2.1.6 release), are you using the HEAD version? Thanks again, -Alex On Feb 17, 2005, at 3:33 PM, Ben Pope wrote: > If you check out the form examples, you'll see: > > > > > > var appValue = jxpathPointer.getValue(); > if (appValue == '') { > var precSiblId = > jxpathContext.getValue("../preceding-sibling::contact/@id"); > var newId = Number(precSiblId) + 1 > jxpathPointer.setValue(newId.toFixed(0)); > } > > > > Which is inside: > form2_bind_xml.xml > > Which is (probably) run from: > http://localhost:82/samples/blocks/forms/form2xml.flow > > (I'm sure you'll figure out the URL differences) > > Which seems to work ok for me. > > Ben > > > > >> -----Original Message----- >> From: Alex Romayev [mailto:romayev@yahoo.com] >> Sent: 17 February 2005 18:56 >> To: users@cocoon.apache.org >> Subject: [CForms] Creating unique ids for new repeater rows >> >> I'm a bit stuck here in trying to figure out how to assign a >> unique id to new repeater rows. I tried referencing an >> external pipeline: >> >> >> >> >> >> where the "default-record" pipeline would create a record and >> assign a unique id attribute, however, it seems that the >> pipeline is being called only once, so all my records end up >> getting the same id. >> >> It feels like there should be an obvious simple way of doing >> it and I'm just completely missing it! >> >> >> Thanks, >> -Alex >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org