From users-return-98495-apmail-cocoon-users-archive=cocoon.apache.org@cocoon.apache.org Mon Feb 08 15:55:39 2010 Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 15686 invoked from network); 8 Feb 2010 15:55:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 15:55:39 -0000 Received: (qmail 66427 invoked by uid 500); 8 Feb 2010 15:55:38 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 66344 invoked by uid 500); 8 Feb 2010 15:55:37 -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 66336 invoked by uid 99); 8 Feb 2010 15:55:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 15:55:37 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Jeffrey.A.Schmitz@boeing.com designates 130.76.32.69 as permitted sender) Received: from [130.76.32.69] (HELO blv-smtpout-01.boeing.com) (130.76.32.69) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 15:55:27 +0000 Received: from slb-av-01.boeing.com (slb-av-01.boeing.com [129.172.13.4]) by blv-smtpout-01.ns.cs.boeing.com (8.14.0/8.14.0/8.14.0/SMTPOUT) with ESMTP id o18Ft5dr024102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 8 Feb 2010 07:55:05 -0800 (PST) Received: from slb-av-01.boeing.com (localhost [127.0.0.1]) by slb-av-01.boeing.com (8.14.0/8.14.0/DOWNSTREAM_RELAY) with ESMTP id o18Ft5bV007196 for ; Mon, 8 Feb 2010 07:55:05 -0800 (PST) Received: from XCH-MWHT-05.mw.nos.boeing.com (xch-mwht-05.mw.nos.boeing.com [134.57.119.160]) by slb-av-01.boeing.com (8.14.0/8.14.0/UPSTREAM_RELAY) with ESMTP id o18Ft1gS007051 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=OK) for ; Mon, 8 Feb 2010 07:55:04 -0800 (PST) Received: from XCH-MW-07V.mw.nos.boeing.com ([134.57.119.195]) by XCH-MWHT-05.mw.nos.boeing.com ([134.57.119.160]) with mapi; Mon, 8 Feb 2010 09:55:03 -0600 From: "Schmitz, Jeffrey A" To: "users@cocoon.apache.org" Date: Mon, 8 Feb 2010 09:55:04 -0600 Subject: Can't use switch with cocoon.request.get in flowscript Thread-Topic: Can't use switch with cocoon.request.get in flowscript Thread-Index: Acqo1xQtHnKx1HtBTjCLwglES7peNw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hello, In Cocoonn 2.1, does anyone know why I can't use a switch command with t= he result of cocoon.request.get in flowscript? if's work just fine, but sw= itch doesn't. E.g. to get the switch to work I have to do the following: var cmd =3D cocoon.request.get("Cmd"); //For some reason, the switch doesn't work with the //string returned from cocoon.request.get, but if //statements do. if (cmd =3D=3D "Open") { cmd =3D "Open"; } if (cmd =3D=3D "Create Model") { cmd =3D "Create Model"; } if (cmd =3D=3D "Account") { cmd =3D "Account"; } if (cmd =3D=3D "Logout") { cmd =3D "Logout"; } switch (cmd) { case "Open": ... I have tried adding .toString() to the end of the get function and also the= cmd variable in various places, but that doesn't work either. Thanks! Jeff --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org