cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suzan Foster - Adnovate <sfos...@adnovate.nl>
Subject RE: Re: flowscript in cocoon2.2
Date Wed, 18 Feb 2009 14:57:30 GMT
Hello Robby,

Can't you use something like:

    <map:flow language="javascript">
        <map:script src="controllers/mainController.js" />
        <map:script src="controllers/previewController.js"/>
        ...
    </map:flow>

    <map:match pattern="*.html">
      <map:call function="{1}"/>
    </map:match>

Vriendelijke groet,
Suzan Foster
Senior System Developer

-----Original Message-----
From: Robby Pelssers [mailto:robby.pelssers@ciber.nl] 
Sent: woensdag 18 februari 2009 14:55
To: users@cocoon.apache.org; lmorandini@ieee.org
Subject: RE: Re: flowscript in cocoon2.2

Good point...

But how should this be implemented?

  <!--+
      | Definition of the control flow implementation.
      +-->
    <map:flow language="javascript">
        <map:script src="controllers/mainController.js" />
        <!-- can I define multiple controllers here?  -->
    </map:flow>

    <map:match pattern="preview.html">
      <!-- HOW does the sitemap know of which controller to invoke this
method?  -->
      <map:call function="_loadPage">
            <map:parameter name="script" value="previewController.js"/>

      </map:call>
    </map:match>

Kind regards,
Robby

-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Luca Morandini
Sent: woensdag 18 februari 2009 14:37
To: users@cocoon.apache.org
Subject: Re: flowscript in cocoon2.2

Robby Pelssers wrote:
> Hi all,
> 
> What do you think of current approach?
> 
> I have defined a mainController which gets one parameter, the name of 
> the specific page controller (previewController.js).  It loads the 
> script and calls the main() method of the previewController which 
> extends the PageController.
> 
> I only need to specify the view and call showPage(). I also inherit
the 
> general application pageData and can add more data specific for the
view.

IIUC, I see a potentially serious performance issue, since scripts are 
loaded at every page invocation and remain in memory until session
expires.

Why don't just define all the script libraries in the sitemap and pass 
merely the name of the controller subclass whose method showPage is to 
be invoked ?

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message