Geert
Thanks - this helps me move a step forward - I now have:
<map:call function="main">
<map:parameter name="userid" value="{session-attr:userID}"/>
<map:parameter name="test" value="foo"/>
</map:call>
and in the flowscript I have:
function main {
var thisUser = cocoon.parameters["userid"];
var thisTest = cocoon.parameters["test"];
...
}
Now thisTest shows up with the value passed to it,
but thisUser does not?
You say I need to create a session ... but my understanding
is that the authentication action (which I use) creates such a
session; certainly when I call a stylesheet with:
<map:transform src="stylesheets/test.xsl">
<map:parameter name="userid" value="{session-attr:userID}"/>
...
the userid IS passed correctly and can be displayed.
How to explain why the same parameter is not passed to
flow??
Thanks
Derek
>>> [EMAIL PROTECTED] 2006/01/18 03:54:16 PM >>>
First of all you have to make sure there is a session object. You can create
one with cocoon.session
or with session actions I believe.
To pass dynamic parameters to flowscript, add the map:parameter to the map:call
statements:
<map:call function="myfunc">
<map:parameter name="myvar" value="{session-attr:myattr}" />
</map:call>
And not to the map:script command!
In flowscript you will need the following:
function myfunc {
var myvar = cocoon.parameters["myvar"];
// or
var myvar = cocoon.parameter.myvar;
...
}
Cheers,
Geert
--
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
[EMAIL PROTECTED]
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]