You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robby Pelssers <ro...@ciber.com> on 2010/03/22 13:22:14 UTC

cocoon.load question

Hi all,

I have a flowscript function where I need to load another script lazy because it get's generated on the fly...

But my first impression is that Cocoon tries to cache a script when it has been loaded the first time and even worse... I think cocoon already tries to preload scripts (when using cocoon.load) on startup which it can't for this use case since no request parameters are present.


var id = cocoon.request.id;
var state = cocoon.request.state;
var uri = 'product/topics/' + id + "/" + state;  // E.g. product/topics/PH3330L/released  -> this pipeline should JSON on the fly


cocoon.load(uri);


Will this approach work or am I gonna run into big troubles?

Thx in advance,
Robby Pelssers