If you want to pass 'global' parameters to flowscript, then you can define them as sitemap globals
and access the global input module from flowscript.
in sitemap:
<map:component-configurations>
<myvar>blabla</myvar>
</map:component-configurations>
<!-- to pass to XSLT -->
<map:parameter name="myvar" value="{global:myvar}" />
in flowscript:
importPackage(Packages.org.apache.cocoon.components.modules.input);
var global = cocoon.getComponent(InputModule.ROLE +
"Selector").select("global");
var myvar = global.getAttribute("myvar",null,null);
Cheers,
Geert
Derek Hohls wrote:
This should be a trivial operation, but is not working:
As per the manual
(http://cocoon.apache.org/2.1/userdocs/flow/sitemap.html),
I have:
Sitemap:
<map:script src="script/dbtest.js">
<map:parameter name="test" value="foo"/>
</map:script>
In dbtest.js:
//param - below is line 33....
var thisTest = cocoon.parameters.test;
which results in this error:
An Error Occurred
Cannot convert null to an object.
org.apache.avalon.framework.CascadingRuntimeException: Cannot convert null to
an object.
cause: TypeError: Cannot convert null to an object. (file:/.../dbtest.js; line
33)
Any ideas how to succesfully pass a parameter to flow?
Thanks
Derek
PS Running Cocoon 2.1.5, JDK 1.4.x
--
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]