bart remmerie wrote:
Dear all,

I'm rewriting some of my cocoon-code and I have the following question that continues to bother me.

I use flow to show a cform (see code below), and I'm wondering if

I need to "terminate" each function in flow in a "clean" way to avoid memory leaks (after the form.showForm(...) provide some action (redirect the user)

I think this is not necessary. The form.showForm() call creates a continuation, which keeps a handle on any objects in memory. After a given period (configured in the xconf) the continuation will be automatically expired, at which point any objects it holds will be garbage collected. As long as all those objects are things you're willing to have in memory for the lifetime of the continuation, you can just leave it be.


or is it perfectly possible to terminate such a function with the form.showForm("myform-display-pipeline.jx"); (where the user redirects her/himself using simple hyperlinks) ?

Is there any info available on this topic ?


function showMyForm(){
   var form=new Form("forms/myform_model.xml");
   form.createBinding("forms/myform_bind_bean.xml");
   form.load (myBean);
   form.showForm("myform-display-pipeline.jx");
}

In the past, I used to have a couple of submit widgets which could be used to "redirect" the user after completing the form (these were included after the form.showForm line:

if (form.getWidget().getSubmitWidget().getName().equals("add_record")){
        cocoon.redirectTo("/addNewRecord/");
}//end if
else ...

Thanks
Bart


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to