Following this tutorial: http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html
I was able to make a custom content model working and i am able to see properties on share view details and edit properties.
Thank you for this great tutorial. It is very helpful.
I wanted my custom properties to search in advance search. I followed the above tutorial and configured advance search option and search form as explained.
I am able to see the properties on advance search page but when i provide the value and search, i get 0 results.
I don't see any errors in my development environment.
Also, one thing i noticed that- search is working for properties "sc
ublished", "sc:isActive" etc.
I have added following properties in addition to what is given in tutorial.
<property name="sc
ublishedBy">
<type>d:text</type>
</property>
<property name="sc
ublishingComment">
<type>d:text</type>
</property>
The values which i have saved for these properties are, values are visible on view details page:
-------------------------------------------------
sc
ublishedBy = Bipin Dixit
sc
ublishingComment = Published this document
-------------------------------------------------
When i submit search from advance search screen by providing the values as mentioned above for the above given properties, i see 0 results.
Can you guide me, if i am missing anything ?
Here is my full content model:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Someco Model</description>
<author>Jeff Potts</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" />
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<!-- Introduction of new namespaces defined by this model -->
<namespaces>
<namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
</namespaces>
<constraints>
<constraint name="sc:campaignList" type="LIST">
<parameter name="allowedValues">
<list>
<value>Application Syndication</value>
<value>Private Event Retailing</value>
<value>Social Shopping</value>
</list>
</parameter>
</constraint>
<constraint name="sc
wnerList" type="LIST">
<parameter name="allowedValues">
<list>
<value>Smith</value>
<value>Jones</value>
<value>Jacobsen</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<!-- Enterprise-wide generic document type -->
<type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<associations>
<association name="sc:relatedDocuments">
<title>Related Documents</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
</mandatory-aspects>
</type>
<type name="sc:whitepaper">
<title>Someco Whitepaper</title>
<parent>sc:doc</parent>
</type>
<type name="sc:marketingDoc">
<title>Someco Marketing Document</title>
<parent>sc:doc</parent>
<properties>
<property name="sc:campaign">
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
<constraints>
<constraint ref="sc:campaignList" />
</constraints>
</property>
<property name="sc:campaignOwner">
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>false</multiple>
<constraints>
<constraint ref="sc
wnerList" />
</constraints>
</property>
</properties>
</type>
<type name="sc:client">
<title>Someco Client</title>
<parent>sys:base</parent>
<properties>
<property name="sc:clientName">
<type>d:text</type>
</property>
<property name="sc:clientId">
<type>d:text</type>
</property>
</properties>
</type>
</types>
<aspects>
<aspect name="sc:webable">
<title>Someco Webable</title>
<properties>
<property name="sc
ublished">
<type>d:date</type>
</property>
<property name="sc:isActive">
<type>d:boolean</type>
<default>false</default>
</property>
<property name="sc
ublishedBy">
<type>d:text</type>
</property>
<property name="sc
ublishingComment">
<type>d:text</type>
</property
</properties>
</aspect>
<aspect name="sc
roductRelated">
<title>Someco Product Metadata</title>
<properties>
<property name="sc
roduct">
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
</property>
<property name="sc:version">
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
</property>
</properties>
</aspect>
<aspect name="sc:clientRelated">
<title>Someco Client Related</title>
<associations>
<association name="sc:relatedClients">
<title>Related Clients</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:client</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
</aspects>
</model>
MyForm:
<!-- sc:whitepaper type (new nodes) -->
<config evaluator="model-type" condition="sc:whitepaper">
<forms>
<!-- Search form -->
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:modified" />
<show id="cm:modifier" />
<!-- sc
roductRelated -->
<show id="sc
roduct" />
<show id="sc:version" />
<!-- sc:webable -->
<show id="sc:isActive" />
<show id="sc
ublished" />
<show id="sc
ublishedBy" />
<show id="sc
ublishingComment" />
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<!-- sc
roductRelated -->
<field id="sc
roduct" label-id="prop.sc_product">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:version" label-id="prop.sc_version">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<!-- sc:webable -->
<field id="sc:isActive" label-id="prop.sc_isActive">
<control template="/org/alfresco/components/form/controls/checkbox.ftl" />
</field>
<field id="sc
ublished" label-id="prop.sc_published">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="sc
ublishedBy" label-id="Published By">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc
ublishingComment" label-id="Publishing Comment">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>