Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 86922 invoked from network); 7 Sep 2003 10:43:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Sep 2003 10:43:36 -0000 Received: (qmail 69040 invoked by uid 500); 7 Sep 2003 10:43:22 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 68815 invoked by uid 500); 7 Sep 2003 10:43:16 -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 68785 invoked from network); 7 Sep 2003 10:43:15 -0000 Received: from unknown (HELO kerberos) (62.116.51.59) by daedalus.apache.org with SMTP; 7 Sep 2003 10:43:15 -0000 Received: From mail.at.efp.cc ([62.116.51.60]) by kerberos (WebShield SMTP v4.5 MR1a); id 1062931380736; Sun, 7 Sep 2003 12:43:00 +0200 Received: from WRPO (wrpo.at.intra.efp.cc [194.107.80.200]) by mail.at.efp.cc (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id h87Agw722837 for ; Sun, 7 Sep 2003 12:42:59 +0200 From: "Reinhard Poetz" To: Subject: RE: [Flow] Support for interceptions Date: Sun, 7 Sep 2003 12:42:44 +0200 Message-ID: <001401c3752c$c6c0c9c0$c8506bc2@WRPO> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <3F5A2F91.6070302@anyware-tech.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal 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 From: Sylvain Wallez > Looks yummy, but without continuation support, a big piece is > missing. > Is there a blocking problem with that ? ... the first answer is "It is work in progress." ;), ... the second is "I wanted to share my code ASAP" ... and the third answer "We (I) have to think more about that." ;) The support for interceptions is a static concept. If a script is added to the JS context it is converted by the AspectWeaver (--> all the interceptions are added). The question for me now is, when do I add the interception? Following script is given: function myFunc() { var x = "bla"; sendPageAndWait( "page1.html", { x : x } ); var y = "bla"; sendPageAndWait( "page2.html", { y : y } ); var z = "bla"; sendPageAndWait( "page3.html", { z : z } ); sendPage( "page4.html" ); } If we have following additional events: - before-continuation() - after-continuation() they are added the function has following structure: (note that there is an after event necessary at line3 to be consistent). function myFunc() { before() after-continuation(): var x = "bla"; before-continuation(); sendPageAndWait( "page1.html", { x : x } ); after-continuation(): var y = "bla"; before-continuation(); sendPageAndWait( "page2.html", { y : y } ); after-continuation(): var z = "bla"; before-continuation(); sendPageAndWait( "page3.html", { z : z } ); after-continuation(); sendPage( "page4.html" ); after(); } Interception defintion file: function my* { before-continuation( sendPageAndWait ): { // e.g. release pooled component here } after-continuation( sendPageAndWait ): { // e.g. lookup pooled component here } } My problem is that this notation is not correct because it should be "before-function-call" and "after-function-call" or is it enough to react on sendPageAndWait(..) only? If yes, how to we deal with e.g. special JXForms or Woody functions were you have to call "sendView(..)" or woody.send()? A possible solution could be cocoon.load( "jxFormsFunctionsScript.js", [ aspects1.js, aspects2.js ] ); And you apply your aspects to the dynamically loaded script. But where do I have to intercept it? Maybe static interception is not enough ... :( What do you think? Reinhard