cancel
Showing results for 
Search instead for 
Did you mean: 

Reference 2 customModels the web-client-config-custom.xml

vitorleite
Champ in-the-making
Champ in-the-making
Hello

I am setting up Alfresco version 3.0.

How to refer the file web-client-config-custom.xml for 2 files customModel.xml?

I managed to create a smooth custom aspect, as the orientation guide for Alfresco. However,

there are examples in the guide to reference more than one CustomModel simultaneously.

Thanks to all.

Att.

Vitor
5 REPLIES 5

vitorleite
Champ in-the-making
Champ in-the-making
Hi.

After several attempts, we found that the code was correct, but was with accents in the comments, which led to errors.

Here are the codes of how files should be for 2 types of different aspects:

**********  Arquivo web-client-config-custom.xml  *****************

   <!– Mostra o Aspecto de Contratos no Wizard –>

   <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="customSmiley Very HappyetalhesContrato"/>
      </aspects>
   </config>

   <!– Mostra as Propriedades de Contrato no Pagina de Detalhes –>
   <config evaluator="aspect-name" condition="customSmiley Very HappyetalhesContrato">
      <property-sheet>
         <separator name="sepCust1" display-label="Detalhes Contratos" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:RazaoSocial"/>
         <show-property name="custom:NumeroContratoSAP"/>
         <show-property name="custom:CNPJ"/>
         <show-property name="custom:IDArquivo"/>
         <show-property name="custom:Vigencia"/>
      </property-sheet>
   </config>

<!– Mostra o Aspecto de Notas Fiscais no Wizard –>
   <config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="customSmiley Very HappyetalhesNF"/>
      </aspects>
   </config>

   <!– Mostra as Propriedades de Notas Fiscais no Pagina de Detalhes –>
   <config evaluator="aspect-name" condition="customSmiley Very HappyetalhesNF">
      <property-sheet>
         <separator name="sepCust1" display-label="Detalhes Nota Fiscal" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:NomeForncedor"/>
         <show-property name="custom:NumeroNF"/>
         <show-property name="custom:NumeroRC"/>
         <show-property name="custom:Vencimento"/>
      </property-sheet>
   </config>




   <!– Apresenta Parametros de Notas Fiscais na Busca Avancada –>
  
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
      <content-types>
            <type name="customSmiley Very HappyetalhesNF" />
      </content-types>
      <custom-properties>
         <meta-data aspect="customSmiley Very HappyetalhesNF" property="custom:NomeForncedor" />
         <meta-data aspect="customSmiley Very HappyetalhesNF" property="custom:NumeroNF" />
         <meta-data aspect="customSmiley Very HappyetalhesNF" property="custom:NumeroRC" />
         <meta-data aspect="customSmiley Very HappyetalhesNF" property="custom:Vencimento" />
         </custom-properties>
      </advanced-search>
   </config>
  
   <!– Apresenta Parametros de Contratos na Busca Avancada –>
  
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
      <content-types>
            <type name="customSmiley Very HappyetalhesContrato" />
      </content-types>
      <custom-properties>
         <meta-data aspect="customSmiley Very HappyetalhesContrato" property="custom:RazaoSocial" />
         <meta-data aspect="customSmiley Very HappyetalhesContrato" property="custom:NumeroContratoSAP" />
         <meta-data aspect="customSmiley Very HappyetalhesContrato" property="custom:CNPJ" />
         <meta-data aspect="customSmiley Very HappyetalhesContrato" property="custom:IDArquivo" />
         <meta-data aspect="customSmiley Very HappyetalhesContrato" property="custom:Vigencia" />
         </custom-properties>
      </advanced-search>
   </config>

**********  Fim do arquivo web-client-config-custom.xml  *****************


**********  Arquivo customModel.xml  *****************
<namespaces>
      <namespace uri="custom.model" prefix="custom"/>
   </namespaces>

   <aspects>

      <!– Definição dos Aspectos para Notas Fiscais –>
      <aspect name="customSmiley Very HappyetalhesNF">
         <title>Detalhes Nota Fiscal</title>
         <properties>
            <property name="custom:NomeForncedor">
               <title>Nome do Fornecedor</title>
               <type>d:text</type>
            </property>
            <property name="custom:NumeroNF">
               <title>Número Nota Fiscal</title>
               <type>d:text</type>
            </property>
            <property name="custom:NumeroRC">
               <title>Número Pedido SAP</title>
               <type>d:text</type>
            </property>
             <property name="custom:Vencimento">
               <title>Vencimento</title>
               <type>d:date</type>
            </property>
         </properties>
      </aspect>
  
      <!– Definição dos Aspectos para Contratos –>
       <aspect name="customSmiley Very HappyetalhesContrato">
         <title>Detalhes Contrato</title>
         <properties>
            <property name="custom:RazaoSocial">
               <title>Razão Social</title>
               <type>d:text</type>
            </property>
            <property name="custom:NumeroContratoSAP">
               <title>Número Contrato SAP</title>
               <type>d:text</type>
            </property>
            <property name="custom:CNPJ">
               <title>CNPJ</title>
               <type>d:text</type>
            </property>
            <property name="custom:IDArquivo">
               <title>ID Arquivo</title>
               <type>d:text</type>
            </property>
             <property name="custom:Vigencia">
               <title>Vigencia</title>
               <type>d:date</type>
            </property>
         </properties>
      </aspect>
     
   </aspects>

**********  Fim do arquivo customModel.xml  *****************

a_evagelopoulos
Champ in-the-making
Champ in-the-making
I work with Alfresco 3.0 Labs.
I want to use My custom date Component for my custom date property at the advanced search. I allready use succesfully my component in Content Wizards
but i cant make it work for the advanced search. Below is the section from the configuration file

   <config evaluator="node-type" condition="exaeSymvaseisSmiley FrustratedymvaseisExae">
      <property-sheet>
      <!– <show-property name="mimetype"
      display-label-id="content_type"
      component-generator="MimeTypeSelectorGenerator" />
      <show-property name="size"
      display-label-id="size"
      converter="org.alfresco.faces.ByteSizeConverter"
      show-in-edit-mode="false" /> –>
      <show-property name="exaeSymvaseis:etaireia_omilou" />   
      <show-property name="exaeSymvaseis:antikeimeno_symvasis" display-label-id="agreement_subject"/>
      <show-property name="exaeSymvaseis:aksia" display-label-id="value" />
      <show-property name="exaeSymvaseis:antisymvallomenos" display-label-id="contracting_partner" />
      <show-property name="exaeSymvaseis:afm" />
      <show-property name="exaeSymvaseis:date_ypografis" display-label-id="sign_date" component-generator="MyDatePickerGenerator"/>
      <show-property name="exaeSymvaseis:enarksi" display-label-id="start_date" component-generator="MyDatePickerGenerator"/>
      <show-property name="exaeSymvaseis:liksi" display-label-id="end_date" component-generator="MyDatePickerGenerator"/>
      <show-property name="exaeSymvaseis:diarkeia" display-label-id="duration" />
      <show-property name="exaeSymvaseis:ananeosi" display-label-id="renewal" />
      <show-property name="exaeSymvaseis:ypeuthinos" display-label-id="responsible" />
      <show-property name="exaeSymvaseis:dieythinsi_kentro_kostous" />
      <show-property name="exaeSymvaseis:katigoria" />      
      <show-property name="exaeSymvaseis:esoda" display-label-id="incoming"/>
      <show-property name="exaeSymvaseis:eksoda" display-label-id="outgoings"/>
      </property-sheet>
   </config>
  
   <config evaluator="string-compare" condition="Content Wizards" replace="true" >
      <default-content-type>
         <type name="exaeSymvaseisSmiley FrustratedymvaseisExae" />
      </default-content-type>
      <!– <test-prop>
         <theType name="thisIsATest" />
      </test-prop> –>
      <content-types>
         <type name="exaeSymvaseisSmiley FrustratedymvaseisExae" />
      </content-types>
   </config>

   <config evaluator="string-compare" condition="Action Wizards">      
      <specialise-types>
         <type name="exaeSymvaseisSmiley FrustratedymvaseisExae" />
      </specialise-types> 
   </config>

   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="exaeSymvaseisSmiley FrustratedymvaseisExae" />
         </content-types>
         <custom-properties>
            <meta-data type="exaeSymvaseisSmiley FrustratedymvaseisExae" property="exaeSymvaseis:etaireia_omilou" />
            <meta-data type="exaeSymvaseisSmiley FrustratedymvaseisExae" property="exaeSymvaseis:antisymvallomenos" display-label-id="contracting_partner" />
            <meta-data type="exaeSymvaseisSmiley FrustratedymvaseisExae" property="exaeSymvaseis:date_ypografis" display-label-id="sign_date" component-generator="MyDatePickerGenerator" />
            <meta-data type="exaeSymvaseisSmiley FrustratedymvaseisExae" property="exaeSymvaseis:dieythinsi_kentro_kostous" />
            <meta-data type="exaeSymvaseisSmiley FrustratedymvaseisExae" property="exaeSymvaseis:eksoda" display-label-id="eksoda" />
         </custom-properties>
      </advanced-search>
   </config>

fracat71
Champ on-the-rise
Champ on-the-rise
I work with Alfresco 3.0 Labs.
I want to use My custom date Component for my custom date property at the advanced search. I allready use succesfully my component in Content Wizards
but i cant make it work for the advanced search
I have a similar problem, Alfresco 3.2 r2, how i can do it?

Thanks

arven77
Champ in-the-making
Champ in-the-making
Either do I…  :?

xander771
Champ in-the-making
Champ in-the-making
Either do I…  :?
are you using the same version?