No, don't do that. The current request will not have that attribute set until you call cocoon.sendPage*(). It can never be used in a flow script.

If you want to share data between a sequence of pages, use sendPageAndWait();

function firstPage() {
var anIntegerId = 100;
cocoon.sendPageAndWait("nextPage", {anIntegerId: anIntegerId});
// next page processing goes here
// you can still access anIntegerId }


otherwise use a global variable (which is equivalent to a session attribute):

var anIntegerId = 0;

function firstPage() {
    anIntegerId = 100;
    cocoon.sendPage("nextPage", {anIntegerId: anIntegerId});
}

function nextPageProcessing() {
   print(anIntegerId);  // prints 100
   ...
}


Regards,


Chris

Jim Horner wrote:

On Wednesday 07 January 2004 17:04, Antonio Gallardo wrote:


No answer :-(





cocoon.sendPage("nextPage", {"anIntegerId": anIntegerId);



I'm no expert (just started using cocoon last week) but reading woody2.js, it appears you should be able to


var bizData = cocoon.request.getAttribute(Packages.org.apache.cocoon.components.flow.FlowHelper.CONTEXT_OBJECT);

var anItegerId =  bizData["anIntegerId"];
                
I wanted to get bizData in an Action so I had to do some "digging".

Jim


--------------------------------------------------------------------- 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]



Reply via email to