Hi,
Thank you for your suggestion. I've implemented a validator
(FolderNameValidator) and tried to add that to the "layouts" of the "Folder"
type in my ecm-types-contrib:
<extension target="org.nuxeo.ecm.platform.types.TypeService"
point="types">
<type id="Folder" coretype="Folder">
<layouts mode="any">
*<layout>docmgmt_folder_heading</layout>*
</layouts>
</type>
</extension>
And define the layout in layouts-contrib (nothing more than adding that
validator) :
<extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
point="layouts">
<layout name="docmgmt_folder_heading">
<templates>
<template mode="any">/layouts/layout_default_template.xhtml</template>
</templates>
<rows>
<row>
<widget>title</widget>
</row>
<row>
<widget>description</widget>
</row>
</rows>
<widget name="title" type="text">
<labels>
<label mode="any">label.dublincore.title</label>
</labels>
<translated>true</translated>
<fields>
<field>dc:title</field>
</fields>
<properties widgetMode="edit">
<property name="required">true</property>
*<property name="validator">FolderNameValidator</property>*
</properties>
</widget>
<widget name="description" type="textarea">
<labels>
<label mode="any">label.dublincore.description</label>
</labels>
<translated>true</translated>
<fields>
<field>dc:description</field>
</fields>
</widget>
</layout>
</extension>
Can I directly modify the folder type layout like this, or do I have to create
a new document type just for that?
You reply would be greatly appreciated.
- Carol
--
Posted by "carolsun" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread:
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2429#6612>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm