cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a Custom Dialog and Alfresco 3.3

jesty000
Champ in-the-making
Champ in-the-making
Hi, I try to deploy the example in Alfresco 3.3 SDK that refer to this address:

http://wiki.alfresco.com/wiki/Adding_a_Custom_Dialog

The menu item to launch the dialog appear, but when I click on it the page refresh without showing the dialog and without errors.

The structure of my jar is:
custom-dialog.jar
-org
–alfresco
—sample
—-AddAspectDialog.class
-META-INF
–faces-config.xml
–MANIFEST.MF

In file /tomcat/shared/classes/alfresco/extension/web-client-config-custom.xml I add the following xml code:

   <config>
   <actions>
      <!– Launch Add Aspect Dialog –>
      <action id="add_aspect">
         <label>Add Aspect</label>
         <image>/images/icons/add.gif</image>
         <action>dialog:addAspect</action>
         <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
         <params>
            <param name="id">#{actionContext.id}</param>
         </params>
      </action>
        
      <!– Add action to more actions menu for each space –>
      <action-group id="space_browse_menu">
         <action idref="add_aspect" />
      </action-group>
   </actions>
</config>

<dialogs>
   <dialog name="addAspect" page="/jsp/extension/add-aspect-dialog.jsp" managed-bean="AddAspectDialog"
           icon="/images/icons/add_content_large.gif" title="Add Aspect"
           description="Adds an aspect to the selected node" />
</dialogs>



Somebody can help me or give me some link of examples that works with Alfresco 3.3

best regards,
David
1 REPLY 1

umututkan
Champ in-the-making
Champ in-the-making
You should put <dialogs> under <alfresco-config><config>, not directly under <alfresco-config>. For your example it has to be like the following…

<alfresco-config>
  <config>
    <actions>
      <!– Launch Add Aspect Dialog –>
      <action id="add_aspect">
        <label>Add Aspect</label>
        <image>/images/icons/add.gif</image>
        <action>dialog:addAspect</action>
        <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
        <params>
          <param name="id">#{actionContext.id}</param>
        </params>
      </action>

      <!– Add action to more actions menu for each space –>
      <action-group id="space_browse_menu">
        <action idref="add_aspect" />
      </action-group>
    </actions>

    <dialogs>
      <dialog name="addAspect" page="/jsp/extension/add-aspect-dialog.jsp" managed-bean="AddAspectDialog"
        icon="/images/icons/add_content_large.gif" title="Add Aspect"
        description="Adds an aspect to the selected node" />
    </dialogs>
  </config>

</alfresco-config>