AnsweredAssumed Answered

context in javascript action

Question asked by ronald on Oct 31, 2006
Latest reply on Jan 8, 2007 by kevinr
Hello,

http://forums.alfresco.com/viewtopic.php?t=3161&highlight=javascript
http://forums.alfresco.com/viewtopic.php?t=3775&highlight=javascript

I read the above posts and tried a lot but still cannot get parameters into my javascript and i don't know either how to return to my original page from my script.

in my web-client-config-custum.xml i have:

   <config>
      <actions>
         <!– Launch Test Javascript Dialog –>
         <action id="test_js">
            <label>Test Javascript</label>
            <image>/images/icons/add.gif</image>
            <!– action>dialog:testJS</action –>
            <!– action-listener>#{BrowseBean.setupContentAction}</action-listener –>             
            <script>/Company Home/Data Dictionary/Scripts/append testmessage.js%26dummy=dummy1</script>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>
                  
         <!– Add action to more actions menu for each space –>
         <action-group id="document_browse_menu">
            <action idref="test_js" />
         </action-group>
      </actions>
   </config>

I know that to get the context (eg. document and space) in a java action
you can reference your BrowseBean. when you have an action-handler with BrowseBean.setupContentAction.
But how can i use (reference) document and space in my javascript action?

How can i return to for example "/alfresco/faces/jsp/browse/browse.jsp" from my javascript action?

A third question i have is:

Where do the methods exist that are referenced in <config><action><onclick>?

Thank in advance for answering these question!

Kind regards,

Ronald Vermeire

Outcomes