You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alexander Malic <Al...@workflow.at> on 2005/07/29 10:56:11 UTC

Why isn't it possible to clone the cocoon.request

hi all,

in flowscript for some reasons i want to use the cocoon.request what i got 
before a continuation.

but when i store it in a local variable befora a continuation i allways 
get the new cocoon.request.

so i thought i'm gonna clone the object (var cr=cocoon.request.clone();). 
but i get following error-message:

TypeError: clone is not a function. 
(file:/C:/JavaDevelopment/jakarta-tomcat-5.0.28/webapps/webdesk3/webdesk/./actions/Groups/Groups.js#9)

can someone help me please:

thanx in advance,
alexander malic

here's my code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function showGroups(){
        .
        .
        .
        var cr=cocoon.request;
        .
        .
        .
        //continuation
        var bkm = cocoon.createWebContinuation();
        .
        .
        .
        cocoon.sendPageAndWait("views/Groups", {
                continuationid: bkm.id,
                groups: groups,
                actpage: (actpage+""),
                maxpage: (maxpage+""),
                pagesize: (pagesize+""),
                maxelements: (page.getTotalNumberOfElements()+""),
                oldrequest: cr
        });
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~