cancel
Showing results for 
Search instead for 
Did you mean: 

Custom 'Edit Content Wizard'?

dpalmeira
Champ in-the-making
Champ in-the-making
Hi all,

I defined a new custom content model with 10 different type of contents for Alfresco 2.1.

Now, I'm trying to make a custom "Create and Edit Content Wizard" to manage content and properties information all together in a simple steps, because we don't want to have two different ways to edit our structured content, I mean some main fields in a view, and then properties in another different one.

In order to do that, I'm developing a "custom create content wizard", using the Alfresco SDK CustomWizard sample as base.

So, my question is:

How can I make an Edit Wizard for my custom contents?, Is it possible?

Thank you
9 REPLIES 9

loftux
Star Contributor
Star Contributor

dpalmeira
Champ in-the-making
Champ in-the-making
Yes, but this article only tells about how to make a custom create content wizard… and we need an Edit custom Wizard, not only the create way.

How we can define a Custom Edit Content Wizard??

Thank you
Diego

loftux
Star Contributor
Star Contributor
I'm not sure there could/should be a customization guide for each type of wizard or dialog.

So read this, it will give you some indication of what you need to do. Then at the bottom, follow the link to the category Web Client Customisation for more info.
Read more, and start trying to do your customized wizard, and get back to this forum with more specific questions (I did this, I expected it to be, but this happened).

I'm not trying to put you off, it is just that in the forum it will be hard to give you a complete guide.

mayhan
Champ in-the-making
Champ in-the-making
dpalmeira, I am not sure if you have found the answer. I am having the same issue. To be more specific, on the web site it says “To redefine a wizard we have to copy the existing definition and replace it with the custom definition (combining config is not supported for wizards).”
Searching through web-client-config-wizards.xml, I can’t find the “edit-content-wizard” I can use to replace with my custom edit content wizard.

dpalmeira
Champ in-the-making
Champ in-the-making
hi, to change the dedault content wizard with your custom create wizard, you have change some settings in your web-client-config-custom.xml file…

1) Change the menu create content for use your custom wizard…
2) Define your new wizard…

Here is my config:


   <!– Define actions to create and edit content –>
   <config>
      <actions>
         <!– Custom Create content Wizard–>
         <action id="custom_create_content">
            <permissions>
               <permission allow="true">CreateChildren</permission>
            </permissions>
            <label-id>custom_create_content_wizard</label-id>
            <image>/images/icons/new_content.gif</image>
            <action>wizard:customCreateContent</action>
         </action>

         <!– Custom Edit content Wizard  (IT DOESN'T WORK YET!!!!)–>
         <action id="custom_edit_content">
            <permissions>
               <permission allow="true">Write</permission>
            </permissions>
            <label-id>custom_create_content_wizard</label-id>
            <image>/images/icons/edit_icon.gif</image>
            <action>wizard:customCreateContent</action>
               <!– <action-listener>#{CheckinCheckoutBean.editFile}</action-listener> –>
               <action-listener>#{WizardManager.setupParameters}</action-listener>
               <params>
                  <param name="id">#{actionContext.id}</param>
               </params>
         </action>
      </actions>
   </config>
   
   <!– Custom create content wizard –>
   <config>
      <wizards>
         <wizard name="customCreateContent"
            managed-bean="CustomCreateContentWizard"
            title-id="custom_create_content_wizard_title"
            description-id="create_content_desc"
            icon="/images/icons/new_content_large.gif">

            <step name="chooseType" title-id="details"
               description-id="create_content_step1_desc">
               <page
                  path="/jsp/extension/wizard/custom-create-content/chooseType.jsp"
                  title-id="create_content_step1_title"
                  description-id="create_content_step1_desc"
                  instruction-id="default_instruction" />
            </step>

            <step name="contentData" title-id="enter_content" description-id="create_content_step2_desc">
               <condition if="#{CustomCreateContentWizard.objectType == '{http://www.mydomain.es/intranet/model/1.0}article'}">
                  <page path="/jsp/extension/wizard/custom-create-content/article/main.jsp"
                        title-id="create_content_step2_title"
                        description-id="create_content_step2_desc"
                        instruction-id="default_instruction" />
               </condition>
            </step>
            
            <step name="summary" title-id="summary"
               description-id="summary_step_description">
               <page path="/jsp/wizard/summary.jsp"
                  title-id="summary" description-id="summary_desc"
                  instruction-id="content_finish_instruction" />
            </step>
         </wizard>
      </wizards>
   </config>

3) In web-client-config-actions.xml, I made 2 changes too…


<action-group id="document_browse">
     <show-link>false</show-link>
     <style-class>inlineAction</style-class>

     <!– MY CHANGE –>
     <!–<action idref="edit_doc_http" />–>
       <action idref="custom_edit_content" />
            <action idref="edit_doc_webdav" />
            <action idref="edit_doc_cifs" />
            <action idref="checkout_doc" />
            <action idref="checkin_doc" />
            <action idref="details_doc" />
            <action idref="delete_doc" />

            <!– Example action defined in-line rather than by reference
            <action id="example2_checkout_doc">
               <permissions>
                  <permission allow="true">CheckOut</permission>
               </permissions>
               <evaluator>org.alfresco.web.action.evaluator.CheckoutDocEvaluator</evaluator>
               <label-id>checkout</label-id>
               <image>/images/icons/CheckOut_icon.gif</image>
               <action-listener>#{CheckinCheckoutBean.setupContentAction}</action-listener>
               <action>checkoutFile</action>
            </action>–>
    </action-group>

   <!– MY CHANGE –>
   <action-group id="browse_create_menu">
       <!–<action idref="create_content" /> –>
   <action idref="custom_create_content" />
        <action idref="create_form" />
        <action idref="create_website_wizard" />
        <action idref="create_space" />
        <action idref="create_space_wizard" />
   </action-group>



I can create my new custom content using my custom create wizard!

The problem is, that I dont know how to replace the edit content dialog for my own wizard for content edit, because it needs to use a checkin/checkout process I think, and I dont find information about how to use this JAVA API to do this edit operation against repository. I'm getting crazy really trying to do this!

Can somebody help me please?
Thank you
Diego

libman
Champ in-the-making
Champ in-the-making
Analyse the sourcecodes of the edit functions here: http://kickjava.com/src/org.alfresco.web.bean.wizard.index.htm
They helped me a little further.

lenna
Champ in-the-making
Champ in-the-making
Hello All,

My problem is a bit similar….

I have created a custom content type "Add Document Properties". & it is working perfectly fine….
Now I want to remove the default "Content" type….
Want to keep a single item in the drop down…..

Have been trying this…
Can someone please help me ASAP??????

freddy_r
Champ in-the-making
Champ in-the-making
hi Lenna,
i'll have to working in a "add content propierties" customization, Smiley Sad  can you help me please??

thanks in advance

durgaprasad
Champ in-the-making
Champ in-the-making
Hi all,

I am newbie to alfresco i just checked out alfresco from SVN.

Now I want to edit the source code which generates preview of the content added to the home space.
From where should I start ?

And please please suggest any basic tutorial available to start handling the source code of web-client project in alfresco


Please Help….  Smiley Sad