cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Add Content

vbaudry
Champ in-the-making
Champ in-the-making
Hi !

I'm trying to customize the Add Content Wizard/Dialog, to do some special processing for some file types.

I successfully created a AddCustomContentDialog for the "addContent" navigation case.

But now I want to customize the "Modify Content Properties" bean to do some stuff in the finishImpl(). So I created an EditContentPropertiesCustomDialog on the EditContentPropertiesDialog model.

I put it in my custom jar.

For configuration, I just created a web-client-config-custom.xml with the lines below :

<config>
      <dialog-container>/jsp/dialog/container.jsp</dialog-container>

      <dialogs>  
         <dialog name="editContentProperties" page="/jsp/content/edit-content-properties.jsp"
                 managed-bean="EditContentPropertiesCustomDialog" icon="/images/icons/details_large.gif"
                 title-id="modify_content_properties" description-id="edit_content_description" />  
                
      </dialogs>
     
   </config>

I didn't want to change the jsp that handles the bean for now.

I also put that in the faces-config-custom.xml to handle the bean :

<managed-bean>
      <description>
         The bean that backs up the Edit Content Properties Dialog
      </description>
      <managed-bean-name>EditContentPropertiesCustomDialog</managed-bean-name>
      <managed-bean-class>org.alfresco.sample.EditContentPropertiesCustomDialog</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
         <property-name>nodeService</property-name>
         <value>#{NodeService}</value>
      </managed-property>
      <managed-property>
         <property-name>fileFolderService</property-name>
         <value>#{FileFolderService}</value>
      </managed-property>
      <managed-property>
         <property-name>dictionaryService</property-name>
         <value>#{DictionaryService}</value>
      </managed-property>
      <managed-property>
         <property-name>browseBean</property-name>
         <value>#{BrowseBean}</value>
      </managed-property>
   </managed-bean>

But when I try to test it, it seems that my CustomDialog isn't used … I put a System.out.println in it and it's never shown.

Any Idea ? Am I missing something ? Or doing something wrong ?

Please help !
10 REPLIES 10

vbaudry
Champ in-the-making
Champ in-the-making
Yes ! It's working now ! Thanks a lot Smiley Happy