Projet

General

Profil

Consuming the extCustomModel.xml?

Ajouté par Hung Pham il y a environ 12 ans

Hello,

I just came across Alfresco Model Editor for the last 2 days. This is a really great tool IMO..

I followed through the guide on Wiki and get the designer tool working on Alfresco Share.

I've also followed the youtube sample to create a custom model and a form...

After everything's done and published, I found the extCustomModel.xml under Data Dictionary/Models and extCustomForm.xml under Data Dictionary/Configurations with all my changes in it... (which is a good sign)

Problem is: how do I use this new content type I just created? It doesn't show up from the type drop down box.

Really lost here as I'm definitely new from Alfresco and this hot-deploy concept

Can anybody please provide me some hints?

Regards,
Hung


Réponses (13)

RE: Consuming the extCustomModel.xml? - Ajouté par Matthieu Laborie il y a environ 12 ans

Hello,

The designer doesn't allow for now to show types and aspects automatically into Alfresco Share.

Create the file tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml and as
in the sample file add your aspects and types as this:

   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">

 <aspects>
         <!-- Aspects that a user can see -->
         <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="cm:effectivity" />
            <aspect name="cm:summarizable" />
            <aspect name="cm:versionable" />
            <aspect name="cm:templatable" />
            <aspect name="cm:emailed" />
            <aspect name="emailserver:aliasable" />
            <aspect name="cm:taggable" />
            <aspect name="app:inlineeditable" />
            <aspect name="gd:googleEditable" />
            <aspect name="cm:geographic" />
            <aspect name="exif:exif" />
         </visible>

         <!-- Aspects that a user can add. Same as "visible" if left empty -->
         <addable>
         </addable>

         <!-- Aspects that a user can remove. Same as "visible" if left empty -->
         <removeable>
         </removeable>
      </aspects>

     <!--
         Used by the "Change Type" action

         Define valid subtypes using the following example:
            <type name="cm:content">
               <subtype name="cm:mysubtype" />
            </type>

         Remember to also add the relevant i18n string(s):
            cm_mysubtype=My SubType
      -->
      <types>
         <type name="cm:content">
         </type>

         <type name="cm:folder">
         </type>
      </types>

</config>

RE: Consuming the extCustomModel.xml? - Ajouté par Zhihai Liu il y a presque 12 ans

I tried the suggested changes in share-config-custom.xml. But this is only for "Change Type" action in Share, i.e., changing type after a document is uploaded. Is there a way to use the form created by the designer during document upload? Another post (https://www.becpg.fr/redmine/boards/2/topics/115) seemed to ask for the same thing. Thanks.

RE: Consuming the extCustomModel.xml? - Ajouté par Matthieu Laborie il y a presque 12 ans

This is standard Alfresco behaviours not due to designer. You have the choice between changing the type of your document manually or with a rule.
You can also add a new type button in share. Please refer to Alfresco documentation for howtos.

Regards

RE: Consuming the extCustomModel.xml? - Ajouté par Alex Chew il y a presque 12 ans

Thank you Matthieu.

It seems the form is initiallly designed to attach to a specified Content Type. If the content is a PNG image then the Exif Data form will be displayed while you click "Edit Metadata" button. And only after you upload/create a content successfully you can see that button. Please correct me if I was wrong.

What I want is to create pure data by filling a form. It's very similar to what Datalist showed me. I am trying to extend Datalist to add new entries. It will be good if I can refer the form definition from extCustomModel.xml.

Regards,
Alex

RE: Consuming the extCustomModel.xml? - Ajouté par Alex Chew il y a presque 12 ans

Wow, it's so great!

I create new Types and new Forms after I loaded share-datalist-form-config.xml and datalistModel.xml to Data Dictionary. Then I can use the newly added forms from Datalist!

Now I can fill in the form from UI share. Many thanks.

Best Regards,
Alex

RE: Consuming the extCustomModel.xml? - Ajouté par tinh doan il y a presque 11 ans

Alex

Can you explane for me, how you add "share-datalist-form-config.xml and datalistModel.xml to Data Dictionary" and how use "the newly added forms from Datalist!"

Best Regards,
Tinh Doan

RE: Consuming the extCustomModel.xml? - Ajouté par Alex Chew il y a presque 11 ans

Actually it is very easy.
1. Define your content types. Make sure all your types inherit DataListItem.
2. Define your forms.
3. Publish the models and forms.
4. Surf to Datalist page and try to add new list. You will see your types in the dialog.

Good luck!

RE: Consuming the extCustomModel.xml? - Ajouté par tinh doan il y a presque 11 ans

Very thanks for your reply, Alex!
But i dont understand some point in your answer.

1. when i defined and published successful my form and model ( i think it's exactly)
i dont see my model in datalist when i create new content.

2. I dont know "Surf to Datalist page". what does this mean?

You can share for me your test project ?

RE: Consuming the extCustomModel.xml? - Ajouté par Maria Isabel FLOREZ RODRIGUEZ il y a presque 11 ans

Hi,

I'm trying to use Alfresco Share model designer. I'm trying to publish already made ??models. Restart Alfresco but I can not take the models from the share at the option of each document called "change type". The answer of this forum has not been very clear to me.

You can please explain to me how I can make models and metadata to design for a document?

The catalina.out log only brings me this error:

[alfresco.solr.AlfrescoSolrDataModel] [SolrTrackerScheduler_Worker-2] Model not updated: ext1: Failed to validate model extensionModel update - found non-incrementally updated TYPE '{http://www.bcpg.fr/model/ext1/1.0} FingInvActa '

Thanks,

Atachment file catalina.out

catalina.out (2,64 Mo) catalina.out catalina.out

RE: Consuming the extCustomModel.xml? - Ajouté par Robert Ross il y a plus de 10 ans

tinh doan a écrit :

Very thanks for your reply, Alex!
But i dont understand some point in your answer.

1. when i defined and published successful my form and model ( i think it's exactly)
i dont see my model in datalist when i create new content.

2. I dont know "Surf to Datalist page". what does this mean?

You can share for me your test project ?

Did you ever get an answer to this? I am in a similar situation of being confused about custom model deployment in Share.

RE: Consuming the extCustomModel.xml? - Ajouté par Robert Ross il y a plus de 10 ans

That was a wildly unhelpful response.

RE: Consuming the extCustomModel.xml? - Ajouté par Matthieu Laborie il y a plus de 10 ans

In the FAQ you have the 2 ways of making models available in share (datalist or change type). If it's not clear enought please detail what is not clear or provide better explanation.
I spend time answer you and fill the FAQ before so please no "wildly unhelpful response".

1. when i defined and published successful my form and model ( i think it's exactly)
i dont see my model in datalist when i create new content.

--> Maybe because it doesn't inherit from DataListItem

2. I dont know "Surf to Datalist page". what does this mean?

--> Means under a site go to (surf) DataList page

    (1-13/13)