Christopher Oliver dijo:
> You can release components after sendPage(). It doesn't block.
>
> How about adding an additional function parameter to sendPageAndWait()?
> In the supplied function you can provide code that will execute _after_
> the pipeline is executed:
>
> var comp = cocoon.getComponent(id);
> ...
> cocoon.sendPageAndWait(uri, bizData, function() {
> cocoon.releaseComponent(comp);
> comp = null;
> });
>
> Here's the new implementation of sendPageAndWait()
>
> FOM_Cocoon.prototype.sendPageAndWait = function(uri, bizData, fun) {
> this.sendPage(uri, bizData, new Continuation());
> if (arguments.length > 2) {
> fun();
> }
> FOM_Cocoon.suicide();
> }
+1 It will save us time in writing code! Looks a great solution.
Best Regards,
Antonio Gallardo