AnsweredAssumed Answered

Help with JavaScript actions?

Question asked by martinbramley on Dec 13, 2007

Can any of you help with the following simple Alfresco JavaScript action?

The intended outcome is that the browser should return to the current page having called the javascript action which outputs the the variables passed in.

I've defined a new action & action-group as below:

         <action id="pindar_test">
            <script>/Company Home/Data Dictionary/Scripts/pindarTestScript.js</script>
               <param name="id">#{}</param>

         <action-group id="pindar_test_actions2">
            <action idref="pindar_test" />

In my dashlet I have:

<r:actions id="col8-actions" value="pindar_test_actions2" context="#{r}" showLink="false" styleClass="inlineAction" />

Where #{r} is a workflow task. Looking at the resultant code in my browser the generated URL is:


In my javascript file I have:

logger.log("Hello world");
logger.log("Args :" + args);


The output I get from running this action is:

17:41:39,171 DEBUG [repo.jscript.ScriptLogger] Hello world
17:41:39,171 DEBUG [repo.jscript.ScriptLogger] Args :null
17:41:39,187 DEBUG [repo.jscript.RhinoScriptProcessor] Time to execute script: 16ms

Why is the args variable null? I would have expected the value to be the taskId?