AnsweredAssumed Answered

Action Configuration Clarification

Question asked by qsdmv on Apr 14, 2011
I have a few of questions about action configuration. Please look at the following example:

<action id="download_doc">
             <label-id>download_doc</label-id>
             <image>/images/icons/download_doc.gif</image>
             <href>#{actionContext.downloadUrl}</href>
         </action>

From this configuation, how does it tie to the custom action java class you might define?  It seems id "download_doc" will be referenced from action group. Other than action group, anywhere will it be referenced.

label and image tags are no question. How about #{actionContext.downloadUrl}? What is actionContext? (It talks about context object. I would like to know what context object and instance of what java class, and how do we setup the attribute etc.) Similar to RequestContext.setValue("downloadUrl") ????

Here is another example:
 <action id="checkout_doc">
            <evaluator>org.alfresco.web.action.evaluator.CheckoutDocEvaluator</evaluator>
            <label-id>checkout</label-id>
            <image>/images/icons/CheckOut_icon.gif</image>
            <action-listener>#{CCCheckoutFileDialog.setupContentAction}</action-listener>
            <action>dialog:checkoutFile</action>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>

It is very straightforward except actionContext.id; listener is actually calling CCCheckoutFileDialog's setupContentAction method action is referencing  checkoutFile dialog etc. ( I am guessing that we should be able to find reference id: checkoutFile from dialog configuration file).

Here is another one:

 <!– Edit document using WebDav access –>
         <action id="edit_doc_webdav">
            <permissions>
               <permission allow="true">Write</permission>
            </permissions>
            <evaluator>org.alfresco.web.action.evaluator.EditDocWebDavEvaluator</evaluator>
            <label-id>edit</label-id>
            <image>/images/icons/edit_icon.gif</image>
            <!– NOTE: uses the special 'actionContext' object supplied by the parent actions component –>
            <onclick>javascript:openDoc('#{actionContext.webdavUrl}');</onclick>
         </action>

How do we find the parent action component from this definition and onclick javascript action etc?

and

 <action>browse</action>
What does it exactly mean? using browser or BrwserBean?

Thanks in advance for any clarifications

Outcomes