Hello, Alfresco community!
Please, help me.
I've created custom datalist and put it to repository.
Now i'm trying to tune share view to manipulate(create/modify/delete) with it.
So, after creating datalist i'm trying to add new elements to it. I want to choose type of element(for ex: catalogBase or catalogElement), but i can't choose. Share makes item catalogBase by default.
I'm using alfresco repo amp archetype, and alfresco share amp archetype.
This is my customModel.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="scr:somecoratingsmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <!-- Optional meta-data about the model -->
<description>Someco Ratings 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 Alfresco Data List Model Definitions -->
<import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl" /> <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/ratings/1.0" prefix="scr" /> </namespaces> <types> <type name="scr:catalogBase"> <title>Catalog Base</title> <parent>dl:dataListItem</parent> <associations> <association name="scr:catalogElements"> <title>childAssociation</title> <target> <class>scr:catalogBase</class> <mandatory>false</mandatory> <many>true</many> </target> </association> </associations> </type> <type name="scr:catalogElement"> <title>Catalog Element</title> <!--<parent>cm:content</parent>-->
<parent>dl:dataListItem</parent> <properties> <property name="scr:title"> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="scr:odering"> <type>d:int</type> <mandatory>true</mandatory> </property> <property name="scr:isLeaf"> <type>d:boolean</type> <mandatory>true</mandatory> </property> </properties> <associations> <association name="scr:catalogNodes"> <title>childAssociation</title> <target> <class>scr:catalogElement</class> <mandatory>false</mandatory> <many>true</many> </target> </association> </associations> </type> </types></model>
this is my share-config-custom.xml
<alfresco-config> <!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary"> <types> <!--<type name="cm:content">-->
<type name="dl:dataListItem"> <subtype name="scr:catalogBase" /> <subtype name="scr:catalogElement" /> </type> <type name="scr:catalogBase"> <subtype name="scr:catalogElement" /> </type> </types> </config> <!-- sc:whitepaper type (existing nodes) -->
<config evaluator="node-type" condition="scr:catalogBase"> <forms> <!-- Default form configuration for the sc:whitepaper type -->
<form> <field-visibility> <show id="scr:title" force="true" /> </field-visibility> <appearance> <field id="scr:title"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> </appearance> </form> <!-- Document Library pop-up Edit Metadata form -->
<form id="doclib-simple-metadata"> <field-visibility> <!-- <show id="cm:name" />-->
<show id="scr:title" force="true" /> </field-visibility> <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" /> <appearance> <field id="scr:title"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> </appearance> </form> <!-- Document Library Inline Edit form -->
<form id="doclib-inline-edit"> <field-visibility> <show id="scr:title" force="true" /> </field-visibility> <appearance> <field id="scr:title"> <control template="/org/alfresco/components/form/controls/textfield.ftl" /> </field> </appearance> </form> </forms> </config></alfresco-config>
Sorry for my english