= "Create Model") {
> cmd = "Create Model";
> }
> if (cmd == "Account") {
> cmd = "Account";
> }
> if (cmd == "Logout") {
> cmd = "Logo
var cmd = String(cocoon.request.getParameter("cmd"));
which did work like a charm so this solution is a cleaner one.
Cheers,
Robby
-Original Message-
From: Thomas Markus [mailto:t.mar...@proventis.net]
Sent: Tuesday, February 09, 2010 11:16 AM
To: users@cocoon.apache.org
S
hi,
use an type conversion (to javascript string) instead of string concat:
switch (String(cmd)) {
...
}
regards
Thomas
>
>
> function testSwitch() {
> var cmd = getCmd("cmd");
> switch(cmd) {
> case "save":
> print("request parameter was save");
>
name); // --> we need to make
sure we get a native javascript object so our switch will work
}
Kind regards,
Robby
-Original Message-
From: Schmitz, Jeffrey A [mailto:jeffrey.a.schm...@boeing.com]
Sent: Monday, February 08, 2010 6:59 PM
To: users@cocoon.apache.org
Subject: RE: Can'
uot;) {
cmd = "Logout";
}
switch (cmd) {
case "Open":
Jeff
Work: 314-232-1997
Cell: 636-448-5990
> -Original Message-
> From: Robby Pelssers [mailto:robby.pelss...@ciber.com]
> Sent: Monday, February 08, 2010 11:56 AM
> To: us
Message-
From: Schmitz, Jeffrey A [mailto:jeffrey.a.schm...@boeing.com]
Sent: Monday, February 08, 2010 5:45 PM
To: users@cocoon.apache.org
Subject: RE: Can't use switch with cocoon.request.get in flowscript
Here's the output. Very strange. Again, 'if' check's work on i
From: Robby Pelssers [mailto:robby.pelss...@ciber.com]
> Sent: Monday, February 08, 2010 10:27 AM
> To: users@cocoon.apache.org
> Subject: RE: Can't use switch with cocoon.request.get in flowscript
>
> Well,
>
> I know for sure the switch works fine in cocoon2.2.
Well,
I know for sure the switch works fine in cocoon2.2. Might not be implemented
properly in an older version of Rhino?
Anyway...
What happens if you use this snippet?? It should at least print something to
your console.
var cmd = cocoon.request.get("Cmd");
print("cmd='" + cmd =