AnsweredAssumed Answered

Custom Action: name of action in list not displayed properly

Question asked by toltech on May 21, 2008
Latest reply on May 23, 2008 by jottley
L.S.,
I finally succeeded in getting my own action class + jsp page working. I basically copied over the Move Action and made little changes in the files, filenames, class names and locations. It still moves and works and presents itself in the action list of the interface.

The only thing which is not working, is the name of the action in the "select action" list of the workspace. In this list I don't see the title but the id-name of the action (in my case "move-replaced" instead of "Move Replaced Action", which I expect.

I created the file move-replaced-action-context.xml containing a bean with id="move-replaced", in this bean there is a reference to alfresco.extension.move-replaced-action-messages.

What is the procedure to get the right title in the "select an action" list ?

These are the contents of the mentioned files:
move-replaced-action-context.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '//-SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   <!– Move Replaced Action Bean –>
   <bean id="move-replaced" class="nl.toltech.alfresco.action.MoveReplacedActionExecuter" parent="action-executer">
      <property name="nodeService">
         <ref bean="NodeService" />
      </property>
   </bean>
   <bean id="extension.actionResourceBundles" parent="actionResourceBundles">
      <property name="resourceBundles">
         <list>
            <value>alfresco.extension.move-replaced-action-messages</value>
         </list>
      </property>
   </bean>
</beans>
move-replaced-action-messages.properties:

action_move_replaced=Move replaced to ''{0}''
title_action_move_replaced=Move Replaced Action

Part of web-client-config-custom.xml:
<config evaluator="string-compare" condition="Action Wizards">
        <!– add custom action handler for "Move Replaced" action –>
        <action-handlers>
                <handler name="move-replaced" class="nl.toltech.alfresco.action.MoveReplacedHandler" />
        </action-handlers>
</config>

in webclient.properties:
action_move_replaced=Move replaced to ''{0}''
title_action_move_replaced=Move Replaced Action

regards,
Robert

Outcomes