Eric Meyer provided the solution:
Send the bizData as a request Attribute and retrieve it back in the flow
function.
In the below sample, before calling
pipelineUtil.processToStream("render/renderPage", bizData, fos)
We added:
Map objectModel = ContextHelper.getObjectModel(this.context);
Request request = ObjectModelHelper.getRequest(objectModel);
request.setAttribute("bizData", bizData);
Then in the flow function we retrieved the bizData as follows:
var bizData = cocoon.request.getAttribute("bizData");
cocoon.sendPage("render/renderPageView, bizData);
Best Regards,
Antonio Gallardo.
Antonio Gallardo escribió:
Hi,
From a java class I call:
pipelineUtil.processToStream("render/renderPage", bizData, fos); [1]
Because I need to use java inside the jxTemplate, I needed to add a
javascript flow function to call the jxTemplate pipeline. My problem
is I don't know how to get the whole bizDataObject from javascript
flow, so far I found:
Packages.org.apache.cocoon.components.flow.FlowHelper.getContextObject(objectModel);
[2]
Should return the bizData object.
My question is how to get the objectModel inside a flow function to to
call FlowHelper.getContextObject() ?
Best Regards,
Antonio Gallardo.
[1]
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/flow/util/PipelineUtil.html#processToStream(java.lang.String,%20java.lang.Object,%20java.io.OutputStream)
[2]
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/flow/FlowHelper.html#getContextObject(java.util.Map)
---------------------------------------------------------------------
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]