From dev-return-58872-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Sun Apr 04 17:22:07 2004 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 39472 invoked from network); 4 Apr 2004 17:22:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Apr 2004 17:22:07 -0000 Received: (qmail 5457 invoked by uid 500); 4 Apr 2004 17:21:55 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 5412 invoked by uid 500); 4 Apr 2004 17:21:55 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 5399 invoked from network); 4 Apr 2004 17:21:55 -0000 Received: from unknown (HELO out001.verizon.net) (206.46.170.140) by daedalus.apache.org with SMTP; 4 Apr 2004 17:21:55 -0000 Received: from verizon.net ([4.40.114.87]) by out001.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040404172158.WUTN1464.out001.verizon.net@verizon.net> for ; Sun, 4 Apr 2004 12:21:58 -0500 Message-ID: <407043D4.4000300@verizon.net> Date: Sun, 04 Apr 2004 10:20:20 -0700 From: Christopher Oliver User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Call continuations from flow instead of sitemap References: <406C6FD9.5010405@reverycodes.com> <20040403204859.GA7094@wlkp.org> <406F339B.5050002@verizon.net> <20040404120547.GA17541@wlkp.org> In-Reply-To: <20040404120547.GA17541@wlkp.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out001.verizon.net from [4.40.114.87] at Sun, 4 Apr 2004 12:21:58 -0500 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Leszek Gawron wrote: >On Sat, Apr 03, 2004 at 01:58:51PM -0800, Christopher Oliver wrote: > > >>These ContinuationsManager API should _not_ be used in a flowscript. Use >>the sitemap to invoke your continuation, please. >> >>Is it possible to solve your problem by using a helper function to send >>the page: >> >>function sendPageAndWait(uri, biz, ttl) { >> cocoon.response.setHeader( "Expires", "-1" ); >> cocoon.response.setHeader( "Cache-Control", "no-cache" ); >> cocoon.response.setHeader( "Pragma", "no-cache" ); >> return cocoon.sendPageAndWait(uri, biz, ttl); >>} >> >> >This would not work as form.showForm() woudn't use this function ... > >Intercepted flow is nicer idea though. Why is it still considered alpha? > > lg > > If you were to use the V2 version of the CForms flowscript API you could do something like this: function showForm(form, uri) { form.setBookmark(); cocoon.response.setHeader( "Expires", "-1" ); cocoon.response.setHeader( "Cache-Control", "no-cache" ); cocoon.response.setHeader( "Pragma", "no-cache" ); form.showForm(uri); } Whenever the form is redisplayed your script will resume right after the call to setBookmark(). You can insert additional code after that which will be executed each time before the form is sent to the browser. Chris