Hi!
I'm a beginner and I want to create a new schema named Kike. My schema
file (kike.xsd) is like that:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://project.nuxeo.org/sample/schemas/sample/"
xmlns:smp="http://project.nuxeo.org/sample/schemas/sample/">
<xs:element name="nombre" type="xs:string"/>
<xs:element name="apellido1" type="xs:string"/>
<xs:element name="apellido2" type="xs:string"/>
</xs:schema>
I add to core-types-contrib.xml file the following lines:
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
...
<schema name="kike" src="schemas/kike.xsd" prefix="smp"/>
</extension>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
...
<doctype name="Kike" extends="Document">
<schema name="kike"/>
</doctype>
</extension>
In the ecm-types-contrib.xml file:
<extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
...
<type id="Kike" coretype="Kike">
<label>Documento de Kike</label>
<icon>/icons/file.gif</icon>
<default-view>view_documents</default-view>
<layout>
<widget jsfcomponent="h:inputText"
schemaname="kike" fieldname="nombre"
required="true"/>
<widget jsfcomponent="h:inputTextarea"
schemaname="kike" fieldname="apellido1"/>
<widget jsfcomponent="h:inputText"
schemaname="kike" fieldname="apellido2"/>
</layout>
</type>
<!-- register Sample as allowed child of Folder -->
<type id="Folder" coretype="Folder">
<subtypes>
...
<type>Kike</type>
</subtypes>
</type>
<!-- register Sample as allowed child of Workspace -->
<type id="Workspace" coretype="Workspace">
<subtypes>
...
<type>Kike</type>
</subtypes>
</type>
</extension>
Finally when I deploy the project I can see my new document type, but
when I introduce the data in the fields and click the Create button I
have the following exception:
org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.WrappedException: Exception:
org.nuxeo.ecm.core.api.ClientException. message: Failed to create
document model
What's my mistake?
Thank you.
--
Enrique Pérez Olivares.
Dpto I+D.
Yerbabuena Software.
[EMAIL PROTECTED]
http://www.yerbabuena.es
Tlf/Fax: 902 995 246
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm