<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Its possible add new fields when create a new document? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319269#M6270</link>
    <description>&lt;P&gt;Hi Yousuf&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2016 15:53:27 GMT</pubDate>
    <dc:creator>ZETTA_INGENIERI</dc:creator>
    <dc:date>2016-08-19T15:53:27Z</dc:date>
    <item>
      <title>Its possible add new fields when create a new document?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319265#M6266</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm Java Developer, but I have a question, It's possible add new field when a user create a new document,? without nuxeo studio?&lt;/P&gt;
&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 23:25:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319265#M6266</guid>
      <dc:creator>ZETTA_INGENIERI</dc:creator>
      <dc:date>2016-05-25T23:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Its possible add new fields when create a new document?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319266#M6267</link>
      <description>&lt;P&gt;Certainly!&lt;/P&gt;
&lt;P&gt;Many configurations and customizations are possible without Nuxeo Studio. However, as it may be more enjoyable for the overzealous developer, it's definitely the more difficult route and requires a good understanding of the many extension points Nuxeo provides exactly for this purpose. Does that make sense?&lt;/P&gt;
&lt;P&gt;There are a lot of steps necessary to do this. In general, you will need to:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;create a new schema with your field definition,&lt;/LI&gt;
&lt;LI&gt;override the default document type schema by simply adding your new schema to the list,&lt;/LI&gt;
&lt;LI&gt;add your new schema to your nuxeo project,&lt;/LI&gt;
&lt;LI&gt;create a new widget to hold the new field,&lt;/LI&gt;
&lt;LI&gt;add you new widget to your document's content view,&lt;/LI&gt;
&lt;LI&gt;package it all up in a Nuxeo compliant marketplace package, and&lt;/LI&gt;
&lt;LI&gt;deploy to your Nuxeo Platform instance.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;For example, in order to add a new field to an existing Document Type's schema, you will need to:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create your new schema (my-new-doc-schema.xsd) with the desired field, for example:&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;

&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nxs="http://www.nuxeo.org/ecm/project/schemas/project1-testproject/companies" xmlns:nxsv="http://www.nuxeo.org/ecm/schemas/core/validation/" xmlns:ref="http://www.nuxeo.org/ecm/schemas/core/external-references/" targetNamespace="http://www.nuxeo.org/ecm/project/schemas/project1-testproject/companies"&amp;gt;  
  &amp;lt;!-- helper XSD definitions for list types --&amp;gt;  
  &amp;lt;xs:complexType name="content"&amp;gt; 
    &amp;lt;xs:sequence&amp;gt; 
      &amp;lt;xs:element name="encoding" type="xs:string"/&amp;gt;  
      &amp;lt;xs:element name="mime-type" type="xs:string"/&amp;gt;  
      &amp;lt;xs:element name="data" type="xs:base64Binary"/&amp;gt;  
      &amp;lt;xs:element name="name" type="xs:string"/&amp;gt;  
      &amp;lt;xs:element name="length" type="xs:long"/&amp;gt;  
      &amp;lt;xs:element name="digest" type="xs:string"/&amp;gt; 
    &amp;lt;/xs:sequence&amp;gt; 
  &amp;lt;/xs:complexType&amp;gt;  
  &amp;lt;xs:simpleType name="stringList"&amp;gt; 
    &amp;lt;xs:list itemType="xs:string"/&amp;gt; 
  &amp;lt;/xs:simpleType&amp;gt;  
  &amp;lt;xs:simpleType name="doubleList"&amp;gt; 
    &amp;lt;xs:list itemType="xs:double"/&amp;gt; 
  &amp;lt;/xs:simpleType&amp;gt;  
  &amp;lt;xs:simpleType name="dateList"&amp;gt; 
    &amp;lt;xs:list itemType="xs:date"/&amp;gt; 
  &amp;lt;/xs:simpleType&amp;gt;  
  &amp;lt;xs:simpleType name="integerList"&amp;gt; 
    &amp;lt;xs:list itemType="xs:integer"/&amp;gt; 
  &amp;lt;/xs:simpleType&amp;gt;  
  &amp;lt;xs:simpleType name="booleanList"&amp;gt; 
    &amp;lt;xs:list itemType="xs:boolean"/&amp;gt; 
  &amp;lt;/xs:simpleType&amp;gt;  
  &amp;lt;xs:complexType name="blobList"&amp;gt; 
    &amp;lt;xs:sequence&amp;gt; 
      &amp;lt;xs:element name="item" type="nxs:content" minOccurs="0" maxOccurs="unbounded"/&amp;gt; 
    &amp;lt;/xs:sequence&amp;gt; 
  &amp;lt;/xs:complexType&amp;gt;

  &amp;lt;!--References my custom companies vocabulary that was created, again, through extensions--&amp;gt;  
  &amp;lt;xs:element name="company"&amp;gt;
    &amp;lt;xs:simpleType&amp;gt;
      &amp;lt;xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="companies"/&amp;gt;
    &amp;lt;/xs:simpleType&amp;gt;
  &amp;lt;/xs:element&amp;gt;

&amp;lt;/xs:schema&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Override the default schema of that document type (in this case Picture) through extension points, by adding for example:&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension point="doctype" target="org.nuxeo.ecm.core.schema.TypeService"&amp;gt;

    &amp;lt;facet name="Picture"&amp;gt;
      &amp;lt;schema name="file"/&amp;gt;
      &amp;lt;schema name="picture"/&amp;gt;
      &amp;lt;schema name="image_metadata"/&amp;gt;
    &amp;lt;/facet&amp;gt;

    &amp;lt;!-- deprecated since 7.1, here for compat --&amp;gt;
    &amp;lt;facet name="MultiviewPicture"/&amp;gt;

    &amp;lt;doctype extends="Document" name="Picture"&amp;gt;
      &amp;lt;schema name="common"/&amp;gt;
      &amp;lt;schema name="uid"/&amp;gt;
      &amp;lt;schema name="dublincore"/&amp;gt;
      &amp;lt;!--Put your new schema here. Obviously you'd name it something better than this...--&amp;gt;
      &amp;lt;schema name="my-new-doc-schema"/&amp;gt;
      &amp;lt;facet name="Picture"/&amp;gt;
      &amp;lt;facet name="Versionable"/&amp;gt;
      &amp;lt;facet name="Publishable"/&amp;gt;
      &amp;lt;facet name="Commentable"/&amp;gt;
      &amp;lt;facet name="HasRelatedText"/&amp;gt;
    &amp;lt;/doctype&amp;gt;

 &amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Make sure, when packaging your project, to declare 'override' in your extension point contribution header. You can learn more about building a Nuxeo compliant marketplace package here: &lt;A href="https://doc.nuxeo.com/display/NXDOC/Understanding+Bundles+Deployment" target="test_blank"&gt;https://doc.nuxeo.com/display/NXDOC/Understanding+Bundles+Deployment&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;You can view the available extension points for your Nuxeo Platform release, here: &lt;A href="http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20DM-7.10/" target="test_blank"&gt;http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20DM-7.10/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also, the Nuxeo Yeoman bootstrap generator may be of interest to you, found here: &lt;A href="https://www.nuxeo.com/blog/the-new-way-to-bootstrap-your-application-with-nuxeo-generator/" target="test_blank"&gt;https://www.nuxeo.com/blog/the-new-way-to-bootstrap-your-application-with-nuxeo-generator/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hopefully this is enough to get you started. If I were to provide you examples for each step, it would become more of a tutorial, and less of an answer. Am I right?&lt;/P&gt;
&lt;P&gt;Of course, you can avoid all of this by registering your Nuxeo Platform with Nuxeo. Nuxeo Studio makes all of this 'easy-peezy-lemon-squeezy'.&lt;/P&gt;
&lt;P&gt;-Yousuf&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 05:09:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319266#M6267</guid>
      <dc:creator>Yousuf_Nejati</dc:creator>
      <dc:date>2016-08-19T05:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Its possible add new fields when create a new document?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319267#M6268</link>
      <description>&lt;P&gt;Thanks a lot for your response. I'd like to add a new field (list type) with database information, for example, a contract type...&lt;/P&gt;
&lt;P&gt;Thank u for your help&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 14:15:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319267#M6268</guid>
      <dc:creator>ZETTA_INGENIERI</dc:creator>
      <dc:date>2016-08-19T14:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Its possible add new fields when create a new document?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319268#M6269</link>
      <description>&lt;P&gt;Hi Zetta,&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:21:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319268#M6269</guid>
      <dc:creator>Yousuf_Nejati</dc:creator>
      <dc:date>2016-08-19T15:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Its possible add new fields when create a new document?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319269#M6270</link>
      <description>&lt;P&gt;Hi Yousuf&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:53:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/its-possible-add-new-fields-when-create-a-new-document/m-p/319269#M6270</guid>
      <dc:creator>ZETTA_INGENIERI</dc:creator>
      <dc:date>2016-08-19T15:53:27Z</dc:date>
    </item>
  </channel>
</rss>

