cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing web-client-config.xml HELP

alessandro
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to apply easy customizations by following the tutorial.
By adding a new language definition in web-client-config-custom.xml I'm expecting the system to populate the combo list in the login page.
Nothing happens: it seems like the extension folder is ignored by the system. The same problem if I want to add a custom type with a custom aspect.

Am I missing any configuration for the extension folder ?
Thanks
Alex

My installation is
Alfresco V1.3 Windows pack
O.S. WIndws xp
8 REPLIES 8

gavinc
Champ in-the-making
Champ in-the-making
Where have you placed your web-client-config-custom.xml file?

Also take a look at: http://wiki.alfresco.com/wiki/Packaging_And_Deploying_Extensions

alessandro
Champ in-the-making
Champ in-the-making
Thanks for your suggestion.
The problem was a forgotten "<!– " marker.

After implementing the Mysop example I can't see any custom type when I create a new object in the Web UI.
I've changed in the extesions folder the following files:
- web-client-config-custom.xml
- exampleModel.xml
- exampleModelcontext.xml

(I've used the deployed example files and removed the comments… nothing new added)

Where should I see the new object type and the custom attributes?
Thanks
Alex

gavinc
Champ in-the-making
Champ in-the-making
Hi,

exampleModelcontext.xml should be named example-model-context.xml.

The -context.xml is the important bit, that's what gets searched for, so it maybe that your model has not been registered.

When you add or create content the Type drop down list should contain an entry saying "Standard Operating Procedure".

alessandro
Champ in-the-making
Champ in-the-making
Right, the file was named properly (example-model-context.xml) but I still don't see any custom type in the list.

These are my files:

web-client-config.custom.xml

<alfresco-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="Custom Content Types">
      <content-types>
         <type name="my:sop" />
      </content-types>
   </config>

   <config evaluator="node-type" condition="my:sop">
      <property-sheet>
         <show-property name="name" showInEditMode="false" />
         <show-property name="mimetype" displayLabelId="mimetype" converter="org.alfresco.faces.MimeTypeConverter" showInEditMode="false" />
         <show-property name="title" showInEditMode="false" />
         <show-property name="description" showInEditMode="false" />
         <show-property name="size" displayLabelId="size" converter="org.alfresco.faces.ByteSizeConverter" showInEditMode="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>

</alfresco-config>

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>

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>

gavinc
Champ in-the-making
Champ in-the-making
I see the problem.

You have a slightly outdated web-client-config-custom.xml file, as described in http://wiki.alfresco.com/wiki/Upgrading_1.3_Web_Client you need to change the "Custom Content Types" config section to "Content Wizards".

The first few lines should therefore look like:


<config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="my:sop" />
      </content-types>
   </config>

alessandro
Champ in-the-making
Champ in-the-making
YEAH! that's it. Thanks. I read the migration tutorial and I've noticed that some of the labels had changed.
Now I can start it and I can see the new custom type but when I start feeling in the property the OK button is GHOST.
Any suggestion ? Is still there anything wrong in the configuration files ?

Thanks for helping me to get up to this point.
Alex

gavinc
Champ in-the-making
Champ in-the-making
There was a bug (AWC-656 on jira) that disabled the OK button on property sheets that do not contain any mandatory fields.

This has been fixed and is available in the HEAD branch of SVN. If you don't want to build from source you can just make sure your property sheet has a mandatory field on ir i.e. the name property.

Hope that helps.

janvg
Champ in-the-making
Champ in-the-making
I followed this same trial (using 1.3-dev) and now I see the example domain model. But when I want to add / or create a new file using standard operation procedure, I always get this error unknown source mime type. 

When adding a JPEG

Please correct the errors below then click OK.
A system error happened during the operation: Transaction didn't commit: Unknown source mimetype: JPEG Image