cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobia Conforto <>
Subject Calling an InputModule from flowscript
Date Wed, 17 Oct 2007 16:20:54 GMT

I'm following the advice Grzegorz gave me about coding my custom
URL-rewriting logic into an input module and using that input module
with the LinkRewriterTransformer, and wherever else I need it.

My input module works well in the sitemap, but I don't seem to be able
to call it from flowscript.  The only references I found are this message
from a year ago:
and the file blocks/slide/samples/flow.js  They both suggests doing this:

var foo = cocoon.getComponent(InputModule.ROLE + "Selector").select("foo");
var foobar = foo.getAttribute("bar", null, null);

where "foo" is the input module's name as configured in cocoon.xconf.

But I cannot pass null to my own input module in place of the third
parameter (Map objectModel) because I use that objectModel in my class!

Is this the recommended way of accessing input modules from flowscript?
If so, how do I pass it the objectModel map?

Question #2:

Both the post and the sample fail to call cocoon.releaseComponent() on
the InputModule selector, after calling getComponent() on it.  I was
under the impression that you should go to great lengths (try/finally)
to release every Avalon component you acquire.  Is it not so?


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

View raw message