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:[email protected]] On Behalf Of Luca Morandini
Sent: woensdag 18 februari 2009 14:37
To: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]