cancel
Showing results for 
Search instead for 
Did you mean: 

problems with web-client-config-custom.xml

aznk
Champ in-the-making
Champ in-the-making
Hello,
I've been trying some content types/aspects by uncommenting the examples in alfresco/extension, I have no errors when launching the server, but it seems like nothing is taken into account in the web interface, like if web-client-config-custom.xml was completely ignored. Here is the code of the files :

- exampleModel.xml :
<?xml version="1.0" encoding="UTF-8"?><!– Definition of new Model –><!– The important part here is the name - Note: the use of the my: namespace     which is defined further on in the document –><model name="my:mynewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">   <!– Optional meta-data about the model –>      <description>Example custom Model</description>   <author></author>   <version>1.0</version>   <!– Imports are required to allow references to definitions in other models –>      <imports>        <!– Import Alfresco Dictionary Definitions –>      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>      <!– Import Alfresco Content Domain Model Definitions –>      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>   </imports>   <!– Introduction of new namespaces defined by this model –>   <!– NOTE: The following namespace my.new.model should be changed to reflect your own namespace –>   <namespaces>      <namespace uri="my.new.model" prefix="my"/>   </namespaces>      <types>         <!– Definition of new Content Type: Standard Operating Procedure –>      <type name="my:sop">         <title>Standard Operating Procedure</title>         <parent>cm:content</parent>         <properties>            <property name="my:publishedDate">               <type>d:datetime</type>            </property>            <property name="my:authorisedBy">               <type>d:text</type>            </property>         </properties>         <associations>            <association name="my:signOff">               <target>                  <class>cm:content</class>                  <mandatory>false</mandatory>                  <many>false</many>               </target>            </association>            <child-association name="my:processSteps">               <target>                  <class>cm:content</class>                  <mandatory>false</mandatory>                  <many>true</many>               </target>         </child-association>                    </associations>      </type>         </types>       <aspects>           <!– Definition of new Content Aspect: Image Classification –>      <aspect name="my:imageClassification">         <title>Image Classfication</title>         <properties>            <property name="my:width">               <type>d:int</type>            </property>            <property name="my:height">               <type>d:int</type>            </property>            <property name="my:resolution">               <type>d:int</type>            </property>         </properties>      </aspect>        </aspects>   </model>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

- web-client-config-custom.xml :

<alfresco-config>   <!– Example of overriding the from email address –>   <!–   <config>      <client>         <from-email-address>someone@your-domain.com</from-email-address>         <search-max-results>100</search-max-results>      </client>   </config>   –>   <!– Example of adding languages to the list in the login page –>   <config evaluator="string-compare" condition="Languages">      <languages>         <language locale="ca_ES">Catalan</language>         <language locale="da_DK">Danish</language>         <language locale="de_DE">German</language>         <language locale="es_ES">Spanish</language>         <language locale="el_GR">Greek</language>         <language locale="fr_FR">French</language>         <language locale="it_IT">Italian</language>         <language locale="ja_JP">Japanese</language>         <language locale="du_NL">Dutch</language>         <language locale="pt_BR">Portuguese (Brazilian)</language>         <language locale="ru_RU">Russian</language>         <language locale="fi_FI">Finnish</language>         <language locale="tr_TR">Turkish</language>         <language locale="zh_CN">Simplified Chinese</language>      </languages>   </config>   <!– Example of configuring advanced search –>   <config evaluator="string-compare" condition="Advanced Search">      <advanced-search>         <content-types>         </content-types>         <custom-properties>            <meta-data aspect="app:simpleworkflow" property="app:approveStep" />         </custom-properties>      </advanced-search>   </config>   <!– Example of changing the sort direction for a view in the client –>    <config evaluator="string-compare" condition="Views">      <views>         <view-defaults>            <topic>               <sort-direction>ascending</sort-direction>            </topic>         </view-defaults>      </views>   </config>    <!– Example of adding a custom icon to the Create Space dialog –>   <config evaluator="string-compare" condition="cm:folder icons">      <icons>         <icon name="space-icon-custom" path="/images/icons/space-icon-custom.gif" />      </icons>   </config>    <!– The config below shows how to incorporate the example model–>   <!– into the web client, for this to work you will need to –>   <!– rename example-model-context.xml.sample to example-model-context.xml –>      <config evaluator="string-compare" condition="Content Wizards">      <content-types>         <type name="my:sop" />      </content-types>   </config>   <config evaluator="node-type" condition="my:sop">      <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="my:publishedDate" />         <show-association name="my:signOff" />         <show-property name="my:authorisedBy" />         <show-child-association name="my:processSteps" />      </property-sheet>   </config>   <config evaluator="aspect-name" condition="my:imageClassification">      <property-sheet>         <show-property name="my:width"/>         <show-property name="my:height"/>         <show-property name="my:resolution"/>      </property-sheet>   </config>   <config evaluator="string-compare" condition="Action Wizards">      <aspects>         <aspect name="my:imageClassification"/>      </aspects>   </config>   <config evaluator="string-compare" condition="Advanced Search">      <advanced-search>         <content-types>            <type name="my:sop" />         </content-types>         <custom-properties>            <meta-data type="my:sop" property="my:authorisedBy" />            <meta-data aspect="my:imageClassification" property="my:resolution" />         </custom-properties>      </advanced-search>   </config>         <config evaluator="node-type" condition="wiki:page">  <property-sheet>    <show-property name="wiki:restrict"/>    <show-property name="wiki:category"/>  </property-sheet></config><config evaluator="string-compare" condition="Custom Content Types">  <content-types>    <type name="wiki:page"/>  </content-types></config><config evaluator="string-compare" condition="Advanced Search">  <advanced-search>     <content-types>        <type name="wiki:page" />     </content-types>     <custom-properties>        <meta-data type="wiki:page" property="wiki:restrict" />        <meta-data type="wiki:page" property="wiki:category" />     </custom-properties>  </advanced-search></config></alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

- example-model-context.xml :

<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <beans>    <!– Registration of new models –>       <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">        <property name="models">            <list>                <value>alfresco/extension/exampleModel.xml</value>            </list>        </property>    </bean>         </beans>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
18 REPLIES 18

unknown-user
Champ on-the-rise
Champ on-the-rise
Out of curiosity are you adding these files inside or outside the war file ?

aznk
Champ in-the-making
Champ in-the-making
yes, I only changed the files located in alfresco/extension.
I managed to make everything work by reinstalling alfresco but sure it is not the best way to do this every time i have a problem…

gutierrez_ge
Champ in-the-making
Champ in-the-making
Hi, i need to add some metadata could you explain me what you did

maheshlinga
Champ in-the-making
Champ in-the-making
Did you find any way of adding new models with out restarting the tomcat webserver?

If so can you please post it here..

Thanks
Mahesh

aznk
Champ in-the-making
Champ in-the-making
visiting the Data dictionary page in the wiki might help, as said here http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Step_5:_Testing_the_Model_definition
you have to restart in order to see your changes.
HTH

gutierrez_ge
Champ in-the-making
Champ in-the-making
i have done all of that… and nothing seems to work… i have a question

the new metadata that i will add, will i see them when i want to add a new content?

maheshlinga
Champ in-the-making
Champ in-the-making
u need to update web client config, inorder to see these newly added meta data fields, U need to update some show property field.

Hope it helps

gutierrez_ge
Champ in-the-making
Champ in-the-making
what properties field and where?

maheshlinga
Champ in-the-making
Champ in-the-making
u need to add an xml snippet similar to the below snippet in web-client-config-properties.xml


<config evaluator="node-type" condition="dictionaryModel">
      <property-sheet> 
         <show-property name="name" />
         <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="title" />
         <show-property name="description" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />   
        <show-property name="modelActive"/>
      </property-sheet>
   </config>
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.

Welcome to the new Hyland Connect. Get started or submit feedback.