tried to create library content model
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2014 06:00 PM
I tried to create library content model but it's showing in create content list, I want to know where is my problem. could you please fix the problem by sharing the code and explain where is my mistake?
library-context.xml
libraryModel.xml
web-client-config-custom.xml
<code>
<alfresco-config>
<!– Custom Content Type Settings –>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="iabook
roduct"/>
</content-types>
</config>
<config evaluator="node-type" condition="iabook
roduct">
<property-sheet>
<show-property name="name" />
<show-property name="mimetype" display-label-id="content_type" component-generator="MimeTypeSelectorGenerator" />
<show-property name="encoding" display-label-id="encoding" ignore-if-missing="false" component-generator="CharsetSelectorGenerator" />
<show-property name="size" display-label-id="size" converter="org.alfresco.faces.ByteSizeConverter" show-in-edit-mode="false" />
<show-property name="title" display-label-id="title" ignore-if-missing="false" />
<show-property name="description" display-label-id="description" ignore-if-missing="false" component-generator="MultilingualTextAreaGenerator" />
<show-property name="iabook:sku" />
<show-property name="iabook:manufacturer" />
<show-property name="iabook:color" />
<show-property name="iabook:brand" />
<show-property name="iabook:unitPrice" />
<show-property name="iabook:displayUntil" />
<show-property name="iabook:competitorProducts" />
<show-property name="iabook:competitorDetails" component-generator="TextAreaGenerator" />
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="lib:library-book"/>
</content-types>
</config>
<config evaluator="node-type" condition="lib:library-book">
<property-sheet>
<show-property name="name" />
<show-property name="mimetype" display-label-id="content_type" component-generator="MimeTypeSelectorGenerator" />
<show-property name="title" display-label-id="title" ignore-if-missing="false" />
<show-property name="description" display-label-id="description" ignore-if-missing="false" component-generator="MultilingualTextAreaGenerator" />
<show-property name="lib
ublisher" />
<show-property name="lib
ages" />
<show-property name="lib:Language" />
<show-property name="lib
lace" />
<show-property name="lib:building" />
</property-sheet>
</config>
</alfresco-config>
</code
library-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/libraryModel.xml</value> </list> </property> </bean></beans>
libraryModel.xml
<?xml version="1.0" encoding="UTF-8"?><model name="lib:library" xmlns="http://www.alfresco.org/model/dictionary/1.0"><description>IUA Library</description><author>Hisham Khartoum</author><version>1.0</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <namespaces> <namespace uri="http://www.iua-library.com/model/content/1.0" prefix="lib"/> </namespaces> <constraints> <constraint name="lib:BookLanguage" type="LIST"> <parameter name="allowedValues"> <list> <value>Arabic</value> <value>English</value> <value>Frensh</value> </list> </parameter> <parameter name="caseSensitive"> <value>false</value> </parameter> </constraint> <constraint name="lib:LibraryBuilding" type="LIST"> <parameter name="allowedValues"> <list> <value>Main Library</value> <value>Engineering College</value> <value>Medicine College</value> <value>Computer College</value> </list> </parameter> <parameter name="caseSensitive"> <value>false</value> </parameter> </constraint> <constraint name="lib:BookPlace" type="LIST"> <parameter name="allowedValues"> <list> <value>First Board</value> <value>Second Board</value> <value>Third Board</value> <value>Forth Board</value> </list> </parameter> <parameter name="caseSensitive"> <value>false</value> </parameter> </constraint> </constraints> <types> <type name="lib:library-book"> <parent>cm:content</parent> <properties> <property name="lib:publisher"> <title>Publisher</title> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="lib:pages"> <title>Pages</title> <type>d:int</type> <mandatory>true</mandatory> </property> <property name="lib:Language"> <title>Language</title> <type>d:text</type> <mandatory>true</mandatory> <constraints> <constraint ref="lib:BookLanguage" /> </constraints> </property> <property name="lib:place"> <title>Place</title> <type>d:text</type> <mandatory>true</mandatory> <constraints> <constraint ref="lib:BookPlace" /> </constraints> </property> <property name="lib:building"> <title>Building</title> <type>d:text</type> <mandatory>true</mandatory> <constraints> <constraint ref="lib:LibraryBuilding" /> </constraints> </property><!– <property name="lib:price"> <title>Price</title> <type>d:double</type> <mandatory>true</mandatory> </property>–> </properties> </type> </types></model>
web-client-config-custom.xml
<code>
<alfresco-config>
<!– Custom Content Type Settings –>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="iabook

</content-types>
</config>
<config evaluator="node-type" condition="iabook

<property-sheet>
<show-property name="name" />
<show-property name="mimetype" display-label-id="content_type" component-generator="MimeTypeSelectorGenerator" />
<show-property name="encoding" display-label-id="encoding" ignore-if-missing="false" component-generator="CharsetSelectorGenerator" />
<show-property name="size" display-label-id="size" converter="org.alfresco.faces.ByteSizeConverter" show-in-edit-mode="false" />
<show-property name="title" display-label-id="title" ignore-if-missing="false" />
<show-property name="description" display-label-id="description" ignore-if-missing="false" component-generator="MultilingualTextAreaGenerator" />
<show-property name="iabook:sku" />
<show-property name="iabook:manufacturer" />
<show-property name="iabook:color" />
<show-property name="iabook:brand" />
<show-property name="iabook:unitPrice" />
<show-property name="iabook:displayUntil" />
<show-property name="iabook:competitorProducts" />
<show-property name="iabook:competitorDetails" component-generator="TextAreaGenerator" />
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="lib:library-book"/>
</content-types>
</config>
<config evaluator="node-type" condition="lib:library-book">
<property-sheet>
<show-property name="name" />
<show-property name="mimetype" display-label-id="content_type" component-generator="MimeTypeSelectorGenerator" />
<show-property name="title" display-label-id="title" ignore-if-missing="false" />
<show-property name="description" display-label-id="description" ignore-if-missing="false" component-generator="MultilingualTextAreaGenerator" />
<show-property name="lib

<show-property name="lib

<show-property name="lib:Language" />
<show-property name="lib

<show-property name="lib:building" />
</property-sheet>
</config>
</alfresco-config>
</code
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2014 01:26 PM
Where did you place those files? you should place all of them (library-context.xml,libraryModel.xml,web-client-config-custom.xml)under classpath:alfresco/extension.
And the configuration will only work on web client,not share.
And the configuration will only work on web client,not share.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2014 02:27 PM
I did fix the problem and it's being fixed, cause I was using the same bean id which cause the problem:
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
I was using extension.dictionaryBootstap then I add library.extension.dictionaryBootstap
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
I was using extension.dictionaryBootstap then I add library.extension.dictionaryBootstap
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2014 09:19 PM
Ok good luck.
