User Tools

Site Tools


forum:alfresco:custom-action

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

forum:alfresco:custom-action [2008/05/23 12:18]
sebastian
forum:alfresco:custom-action [2023/11/19 22:46] (current)
Line 37: Line 37:
   - Part one is about creating the QuickCheckout as a custom action. This action will be available in the list of actions for a document.   - Part one is about creating the QuickCheckout as a custom action. This action will be available in the list of actions for a document.
   - Part two shows how to make this action available as a button in the web client UI.   - Part two shows how to make this action available as a button in the web client UI.
 +For deployment it is assumed that there is an exploded alfresco.war in the deployment directory of the application server. The action is available as soon as the files are copied into the specified directories and the application server is restarted. The names of the files are given above the file contents. The directory the files have to be deployed to can be found at the bottom of the file contents.
  
 ==== Part 1: Creating a custom action ==== ==== Part 1: Creating a custom action ====
Line 47: Line 48:
 === The action class === === The action class ===
 The QuickCheckout class is the actual implementation of the QuickCheckout action. It extends ActionExecuterAbstractBase and overrides executeImpl(). This method will later be called to start the action. The QuickCheckout class is the actual implementation of the QuickCheckout action. It extends ActionExecuterAbstractBase and overrides executeImpl(). This method will later be called to start the action.
 +
 ''​QuickCheckout.java''​ ''​QuickCheckout.java''​
 <​code>​ <​code>​
Line 231: Line 233:
         return targetSubFolder;​         return targetSubFolder;​
     }     }
 +
  
     /**     /**
Line 245: Line 248:
 === The messages file === === The messages file ===
 The messages file for an action must at least contain a title and a description for the action. The messages file for an action must at least contain a title and a description for the action.
 +
 ''​quick-checkout-messages.properties''​ ''​quick-checkout-messages.properties''​
 <​code>​ <​code>​
Line 298: Line 302:
  
 The file has to be saved in conf/​alfresco/​extension The file has to be saved in conf/​alfresco/​extension
 +
  
 ==== Part 2: Making the action available to the web client ==== ==== Part 2: Making the action available to the web client ====
Line 477: Line 482:
    <​!-- initialisation. Overwrite this file with your custom version. ​  ​-->​    <​!-- initialisation. Overwrite this file with your custom version. ​  ​-->​
    <​!-- *************************************************************** -->    <​!-- *************************************************************** -->
 +
        
    <​managed-bean>​    <​managed-bean>​
Line 537: Line 543:
         <!-- Actions Menu for Document Details screen -->         <!-- Actions Menu for Document Details screen -->
         <​action-group id="​doc_details_actions">​         <​action-group id="​doc_details_actions">​
-            <action idref="​quitck_checkout_doc" />+            <action idref="​quick_checkout_doc" />
         </​action-group>​         </​action-group>​
     </​actions>​     </​actions>​
Line 546: Line 552:
  
 ===== TODO ===== ===== TODO =====
-  * The bean classes shouldn'​t reside directly in the alfresco.war deploy dir+  * The bean classes shouldn'​t reside directly in the alfresco.war deploy dir. This can be achived by packaging the files into an Alfresco module (.amp) file.
-  * The doQuickCheckout method of QuickCheckoutBean contains the name of the target subfolder. This should ​be given as a parameter. +
-  * Add icon, title, description to the automatically created space.+
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
forum/alfresco/custom-action.1211545108.txt.gz · Last modified: 2023/11/19 22:45 (external edit)