Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 90468 invoked from network); 16 Mar 2006 14:14:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Mar 2006 14:14:37 -0000 Received: (qmail 59363 invoked by uid 500); 16 Mar 2006 14:14:32 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 59297 invoked by uid 500); 16 Mar 2006 14:14:32 -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 List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 59286 invoked by uid 99); 16 Mar 2006 14:14:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 06:14:32 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [163.231.12.68] (HELO mailout-tlr.thomson.com) (163.231.12.68) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 06:14:31 -0800 Received: from mailout-tlr.thomson.com (localhost [127.0.0.1]) by mailout-tlr.thomson.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id k2GEE9g3004130 for ; Thu, 16 Mar 2006 14:14:10 GMT Received: from tlrusmneagfe04.ERF.THOMSON.COM (tlrusmneagfe04.erf.thomson.com [163.231.22.131]) by mailout-tlr.thomson.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id k2GEE9ae004121 for ; Thu, 16 Mar 2006 14:14:09 GMT Received: from tlrchbermbx01.ERF.THOMSON.COM ([10.222.232.6]) by tlrusmneagfe04.ERF.THOMSON.COM with Microsoft SMTPSVC(6.0.3790.211); Thu, 16 Mar 2006 08:14:09 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: CForms: multiple fd:submit Date: Thu, 16 Mar 2006 15:13:42 +0100 Message-ID: <8D8D5C193740B04894FA6AA9F767A4E5015F2E2C@tlrchbermbx01.ERF.THOMSON.COM> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: CForms: multiple fd:submit Thread-Index: AcZJA5EhxXGnBwI4RXCKWq3wCLnpHAAACp8g From: To: X-OriginalArrivalTime: 16 Mar 2006 14:14:09.0449 (UTC) FILETIME=[E4881190:01C64903] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It's OK, I was using form.submitId() instead of form.submitId -----Original Message----- From: Fernando D. Mato Mira [mailto:matomira@acm.org]=20 Sent: Thursday, March 16, 2006 3:08 PM To: users@cocoon.apache.org Subject: Re: CForms: multiple fd:submit It also doesn't work on 2.1.8, but when I try to use this workaround I = get: org.mozilla.javascript.EcmaError: foo is not a function. where foo is the id of the button I pressed. It shows the discriminator line as the location of the error. Josep A. Frau wrote: > This code don't work for me en Cocoon 2.1.7. I think its a problem=20 > with the javascript type. > > I use: > > form.showForm(); > switch(* String (*form.submitId)) { > case "details": > showDetails(); > break; > case "create": > createNew(); > break; > case "cart": > redisplayForm =3D false; > showCart(); > break; > case "ok": > redisplayForm =3D false; > processForm(form); > break; > } > > > > =20 > > En/na Jeroen Reijn ha escrit: > >> Hi Fernando, >> >> You can react in flow based on the submitId of the form. >> >> You can request the submitId from flow by using: >> >> form.submitId >> >> Example: >> >> form.showForm(); >> switch(form.submitId) { >> case "details": >> showDetails(); >> break; >> case "create": >> createNew(); >> break; >> case "cart": >> redisplayForm =3D false; >> showCart(); >> break; >> case "ok": >> redisplayForm =3D false; >> processForm(form); >> break; >> } >> >> I found the example in the archives. >> >> Regards, >> >> Reijn >> >> >> >> Fernando.Matomira@thomson.com wrote: >> >>> How can one react differently in a flow when there are several=20 >>> fd:submit elements in a form? >>> >>> =20 >>> >>> Thanks >>> >> >> Kind regards, >> >> Jeroen Reijn >> >> Hippo >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> >> > >--=20 >Josep A. Frau >Centre de Tecnologies de la Informaci=F3 >Universitat de les Illes Balears > =20 > --=20 -- Fernando D. Mato Mira matomira@acm.org Thomson Corporation Switzerland AG --------------------------------------------------------------------- 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