Hi Ard,

unfortunately there is one big difference. flow-attributes don't have to be Strings. I want to pass a w3c-dom document to a pipeline. At the moment I store it in the users session and remove it right after using it, but that is really ugly in my oppinion.

Chris


Ard Schrijvers schrieb:
Hello, you might just replace uri with uri?param1=param1Value
and in the pipeline matching to uri use {request-param:param1}..

I did not test it, and perhaps to simple solution for your problem, but think 
it works

Ard

Hi,

I am currently using the folowing pipeline to let cocoon load a pipelines result to a dom-object:
function loadDocument(uri) {
    // AE: cocoon://
    var parser = null;
    var source = null;
    var resolver = null;
    try {
        parser = cocoon.getComponent(DOMParser.ROLE);
        resolver = cocoon.getComponent(SourceResolver.ROLE);
        source = resolver.resolveURI(uri);
if (source.getClass().getName().equals("org.apache.cocoon.compone nts.source.impl.SitemapSource") == false) {
            print("Warning: loadDocument received an incorrect URI:");
print(" " + source.getClass().getName()); }
        var is = new InputSource(source.getInputStream());
        is.setSystemId(source.getURI());
        return parser.parseDocument(is);
    } finally {
        if (source != null)
            resolver.release(source);
        cocoon.releaseComponent(parser);
        cocoon.releaseComponent(resolver);
    }
}

I would now like to extend the function in a way that I can add flow-attributes.
At the moment I call the function lets say this way:
var doc = loadDocument("cocoon:/testpipeline");
I would now like to ba able to do this:
var doc = loadDocument("cocoon:/testpipeline", {"param1": param1Value});

Any ideas and hints to how I can accieve this?

Regards,
     Christofer Dutz


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




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

Reply via email to