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:17]
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 241: Line 244:
 } }
 </​code>​ </​code>​
-The class must be copied to /deploy/​Alfresco.war/​WEB-INF/​classes.+The class must be copied to deploy/​Alfresco.war/​WEB-INF/​classes.
  
 === 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 254: Line 258:
 </​code>​ </​code>​
  
-The file has to be saved in /conf/​alfresco/​extension+The file has to be saved in conf/​alfresco/​extension
  
 === Adding the action to the Spring context === === Adding the action to the Spring context ===
Line 297: Line 301:
 </​code>​ </​code>​
  
-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 461: Line 466:
 </​code>​ </​code>​
  
-The class must be copied to /deploy/​Alfresco.war/​WEB-INF/​classes.+The class must be copied to deploy/​Alfresco.war/​WEB-INF/​classes.
  
 === Making the backing bean managed === === Making the backing bean managed ===
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 512: Line 518:
  
 === Including the action in the web client === === Including the action in the web client ===
-To make the action available to Alfresco the web-client-config-custom.xml file has to be altered. This file resides in the /conf/​alfresco/​extension/​ directory. The following lines have to be added to ''​web-client-config-custom.xml'':​+To make the action available to Alfresco the web-client-config-custom.xml file has to be altered. This file resides in the conf/​alfresco/​extension/​ directory. The following lines have to be added to ''​web-client-config-custom.xml'':​
 <code xml> <code xml>
 <​config>​ <​config>​
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 543: Line 549:
 </​code>​ </​code>​
  
-This file resides in the /conf/​alfresco/​extension/​ directory+This file resides in the conf/​alfresco/​extension/​ directory
  
 ===== 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.1211545057.txt.gz · Last modified: 2023/11/19 22:45 (external edit)