cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sven goosen <>
Subject aggregating a flowscript-page
Date Thu, 07 Dec 2006 22:46:59 GMT

I'm new to the entire technique of Flowscript. but what I want should be 

I Only know as much as is told in the flowscript tutorial 
(, but have 
created my own little javascript flows.

The relevant pages of my sitemap:
<map:flow language="javascript">
  <map:script src="flow/login.js"/>

  <!-- this will load the flowscript-page
  <map:match pattern="*.jx">
    <map:generate type="jx" src="scripts/{1}.jx"/>
    <map:transform src="forms.xsl"/>
    <map:serialize type="html"/>
  <map:match pattern="*.kont">
    <map:call continuation="{1}"/>

  <map:match pattern="logintest">
    <map:call function="login"/>

<!--------------------------end of -------------------->

What I want to have, is that every *.jx page will be aggregated with my 
But how can I do this. I can't put an <map:aggregate> in my *.jx match. 
because the <map:generate> is already there.

Here is the flowscript i use, it must send a page with an login form, 
and when it receives a user/password it must send those to an other page:
function login() {   
  var text = "not logged in"

  while (true) {
    var username = cocoon.request.get("username");
    var password =  cocoon.request.get("password");

    if (username) {
      cocoon.sendPageAndWait("login.jx", { "message":  text} );
  cocoon.sendPage("success.jx", {"username" : username, "password" : 
password} );
<!---------------------------end of flowscript------------------->

Any hints, or examples on how i can manage this, will be helpfull!

Thanks in advance,
 Sven Goosen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message