Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 88856 invoked from network); 20 Mar 2009 10:26:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2009 10:26:12 -0000 Received: (qmail 59813 invoked by uid 500); 20 Mar 2009 10:26:10 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 59753 invoked by uid 500); 20 Mar 2009 10:26:10 -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 59744 invoked by uid 99); 20 Mar 2009 10:26:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 03:26:10 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of remmerie@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 10:26:02 +0000 Received: by nf-out-0910.google.com with SMTP id e27so173812nfd.8 for ; Fri, 20 Mar 2009 03:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=p5HgXGY4f1RZqDiBFi5M056h5c4Mj3T+Nf7CCsfg8A0=; b=IEj0OV81uQeTYBcQm/AcoCRzWRaKEYud5KkULlAi9DPeRSJhaircLOejrYqKUY4m4L RQqpvQ1LIzs53tQ+hdwZIOTIYwGVtOxQ2unpk1LKx9YrPc6091T4NDelcySfjUbJk/Md o+Qc+3al04ADRg+ZqHvG2vD/rHBlLQYpw4/1U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=YejRIf59+NY5fv6vyqyCzwhWVvr2mmhPwprPCDGVMc27MDzgzzmqgxMK5UYb+BsMrq WA9gD5APBs1a+GyToqr2AjWQM33OP7opKrSB3OEKxbS5UKhBUNdLyBonQiWHD+/dHmFZ 8+CQXxOy8mzWDEK5GLTOEpYkK5CfLPMP+eEAY= MIME-Version: 1.0 Received: by 10.210.76.4 with SMTP id y4mr2727607eba.17.1237544741706; Fri, 20 Mar 2009 03:25:41 -0700 (PDT) Date: Fri, 20 Mar 2009 11:25:41 +0100 Message-ID: <9baa770d0903200325rf5e3789idc545618c13b9148@mail.gmail.com> Subject: how to get the continuation-id in flowscript ? From: Bart Remmerie To: users@cocoon.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Dear all, I'm working on a webapp with some basic multi-lingual cforms, using continuations. I've implemented a language changing option on all of my pages, handled by a cocoon pipeline and redirecting the user to the previous page (as if he never left that page). All of that works (see code below) ... until continuations occur. I'm having the following questions: 1. is this the right way to go 2. is there a way to get the continuation-id (which is not visible in the url, but hidden in an input-field named 'continuation-id') 3. any hints, samples to improve this / make it more elegant are more than welcome. I don't know if I explained it well, but I hope the code below clarifies it a bit. For the continuations I'm using the following approach in my template & sit= emap template-snippet: =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 sitemap-snippet: =A0=A0=A0=A0=A0=A0 Now I've just copied a "switch language" feature into my webapp, using the following code in my template/final html: =A0=A0=A0
  • en
  • fr
  • using this in the sitemap and this is the code in flowscript: function chooseLang (language) { var destination =3D ''+cocoon.request.getHeader("Referer"); if (destination =3D=3D null ) destination =3D "/start"; cocoon.session.setAttribute("userLanguage", language); getQTank().setUserLocale(language); // sets the user locale in a session scoped spring bean cocoon.redirectTo (destination); } All of this works perfect ... until a continuation pops up: since the destination doesn't hold the continuation-id. I can manage to add a new matcher in the sitemap with a pattern *.continue, and adjust the destination to hold the continuation-id, but I CANNOT FIND that continuation-id using flowscript. I could of course change my continuation-usage pattern to the classic *.continue everywhere, but I was hoping that: 1. someone could give me the syntax for finding out the continuation-id of the previous page, which is stored somewhere in an input field named 'continuation-id' 2. any other hints letting me know if this effort is leading somewhere or that I should just change the whole thing By the way, I'm using 2.1.11 Thanks & regards, Bart --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org