hi,

i actually don't know if it is possible to access sitemap actions from flowscript, but i think
it would not be the preferred way to control flow as you should not mix sitemap flow control
(actions) with advanced control flow (flowscript).


If you want to access a file you can use the SourceResolver directly from flowscript. For example,
if you want parse a document given its uri, you could use:


var resolver = cocoon.getComponent(Packages.org.apache.excalibur.source.SourceResolver.ROLE);

var source = resolver.resolveURI(uri);
var parser = cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
var document = parser.parseDocument(Packages.org.apache.cocoon.components.source.SourceUtil.getInputSource(source));



Chumahov Leonid wrote:


Hi

I tried to use the action in the my application based on flow (Cocoon 2.1.4). I have read mail archive and have found, that it can be made.

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102560174824115&w=2

However it turns out nothing.

I tried differently.

cocoon.act("myaction", "", {"p1":"v1", "p2":"v2"});

act("myaction ", "", {"p1":"v1", "p2":"v2"});

cocoon.callAction("myaction ", "", {"p1":"v1", "p2":"v2"});

callAction("myaction ", "", {"p1":"v1", "p2":"v2"});

Always I receive an exception, that function is inaccessible.

org.apache.avalon.framework.CascadingRuntimeException: callAction is not a function.

org.apache.avalon.framework.CascadingRuntimeException: "callAction" is not defined

org.apache.avalon.framework.CascadingRuntimeException: "act" is not defined.

org.apache.avalon.framework.CascadingRuntimeException: act is not a function

In examples of a cocoon I also not our use of the given function though it is declared in the documentation.

Whether somebody can help me something.

In case use the action in flow is impossible, whether somebody can prompt that as better to receive from flow access to files on a "correct coccon" way.

In the action I used SourceResolver for this task. Can I use SourceResolver in flowscript?

Thanks

Leonid Chumanov



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



Reply via email to