src/main/resources/aspects/CopyItem/copyitem.js
/**
 * Send the current page and wait for the flow to be continued. This method will
 * preform two usefull actions: set the flow parameter & add result information.
 *
 * The flow parameter is used by the sitemap to seperate requests comming from a
 * flow script from just normal urls.
 *
 * The result object could potentialy contain a notice message and a list of
 * errors. If either of these are present then they are added to the sitemap's
 * parameters.
 */
Send the current page and wait for the flow to be continued. This method will
preform two usefull actions: set the flow parameter & add result information.

The flow parameter is used by the sitemap to seperate requests comming from a
flow script from just normal urls.

The result object could potentialy contain a notice message and a list of
errors. If either of these are present then they are added to the sitemap's
parameters.
Send the current page and wait for the flow to be continued . This method will preform two usefull actions : set the flow parameter & add result information . The flow parameter is used by the sitemap to seperate requests comming from a flow script from just normal urls . The result object could potentialy contain a notice message and a list of errors . If either of these are present then they are added to the sitemap ' s parameters .
function sendPageAndWait(uri,bizData,result)
{
    if (bizData == null)
        bizData = {};
    if (result != null)
    {
        var outcome = result.getOutcome();
        var header = result.getHeader();
        var message = result.getMessage();
        var characters = result.getCharacters();
        if (message != null || characters != null)
        {
            bizData["notice"]     = "true";
            bizData["outcome"]    = outcome;
            bizData["header"]     = header;
            bizData["message"]    = message;
            bizData["characters"] = characters;
        }
        var errors = result.getErrorString();
        if (errors != null)
        {
            bizData["errors"] = errors;
        }
    }
    bizData["flow"] = "true";
    cocoon.sendPageAndWait(uri,bizData);
}
function sendPageAndWait ( uri , bizData , result ) { if ( bizData == null ) bizData = { } ; if ( result != null ) { var outcome = result . getOutcome ( ) ; var header = result . getHeader ( ) ; var message = result . getMessage ( ) ; var characters = result . getCharacters ( ) ; if ( message != null || characters != null ) { bizData [ "notice" ] = "true" ; bizData [ "outcome" ] = outcome ; bizData [ "header" ] = header ; bizData [ "message" ] = message ; bizData [ "characters" ] = characters ; } var errors = result . getErrorString ( ) ; if ( errors != null ) { bizData [ "errors" ] = errors ; } } bizData [ "flow" ] = "true" ; cocoon . sendPageAndWait ( uri , bizData ) ; }
Send the current page and wait for the flow to be continued.
Send the current page and wait for the flow to be continued .
// just to remember where we came from.