<?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: How to add a property to all documents? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320935#M7936</link>
    <description>&lt;P&gt;ok, you convince me.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2012 18:08:23 GMT</pubDate>
    <dc:creator>jeremie_</dc:creator>
    <dc:date>2012-02-14T18:08:23Z</dc:date>
    <item>
      <title>How to add a property to all documents?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320933#M7934</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;i m trying to extends all my documents with a new directory item (which looks like Subjects) and get rid of Coverage one.&lt;/P&gt;
&lt;P&gt;so, i choose a custom dublincore schema that override default one, making a widget and extends the layout...but i get errors, almost everywhere.&lt;BR /&gt; /&amp;gt;
May be it's not as simple as overriding dublincore ?&lt;BR /&gt; /&amp;gt;
Do y have to register a new schema and extend all types of documents ?&lt;/P&gt;
&lt;P&gt;thanks,
jérémie&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 01:53:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320933#M7934</guid>
      <dc:creator>jeremie_</dc:creator>
      <dc:date>2012-02-14T01:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a property to all documents?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320934#M7935</link>
      <description>&lt;P&gt;Overriding dublincore is evil &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Dublincore is the schema that store all the mandatory fields of Nuxeo Document. This is a standard schema, if you want to see a bit more on this point &lt;A href="http://en.wikipedia.org/wiki/Dublin_Core"&gt;go there&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;But that's not only for that. for maintenance of your code, if we update something on this part of our code, you will have to take care of our updates to push them into your code.&lt;/P&gt;
&lt;P&gt;And last, but no least your error may happens because when you has overridden the schema you remove some fields but you didn't update the layout that wait for this field...&lt;/P&gt;
&lt;P&gt;Anyway I hope, I convince you to not go to this way.&lt;/P&gt;
&lt;P&gt;A better way is to:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create your own schema&lt;/LI&gt;
&lt;LI&gt;Override File and Folder docType definition to just add this new schema. As all documents extends that docTypes you must have all Doc Type implementing your schema.&lt;/LI&gt;
&lt;LI&gt;Override the "dublincore" layout to add your widget (mmmh... ) or create your own layout and add it in all your document presentation definition.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To override the core type definition, I think you just have to do something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;require&amp;gt;org.nuxeo.ecm.core.CoreExtensions&amp;lt;/require&amp;gt;
&amp;lt;extension target="org.nuxeo.ecm.core.schema.TypeService"
    point="configuration"&amp;gt;
&amp;lt;doctype name="Folder" extends="Document"&amp;gt;
  &amp;lt;schema name="myschema"/&amp;gt;
&amp;lt;/doctype&amp;gt;

&amp;lt;doctype name="File" extends="Document"&amp;gt;
  &amp;lt;schema name="myschema"/&amp;gt;
&amp;lt;/doctype&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To override dublincore layout, you will have something like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;require&amp;gt;org.nuxeo.ecm.platform.forms.layouts.webapp&amp;lt;/require&amp;gt;
&amp;lt;extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="layouts"&amp;gt;
    &amp;lt;layout name="dublincore"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope that will help you.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:26:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320934#M7935</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-14T12:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a property to all documents?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320935#M7936</link>
      <description>&lt;P&gt;ok, you convince me.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 18:08:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320935#M7936</guid>
      <dc:creator>jeremie_</dc:creator>
      <dc:date>2012-02-14T18:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a property to all documents?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320936#M7937</link>
      <description>&lt;P&gt;Did you define your location schema&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 18:38:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320936#M7937</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-14T18:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a property to all documents?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320937#M7938</link>
      <description>&lt;P&gt;here is the whole thing&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 19:29:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320937#M7938</guid>
      <dc:creator>jeremie_</dc:creator>
      <dc:date>2012-02-14T19:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a property to all documents?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320938#M7939</link>
      <description>&lt;P&gt;All seems good can you please give us some information of your error. Please refer to [this answer][1] item if you don't know how.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2012 19:36:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-property-to-all-documents/m-p/320938#M7939</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-25T19:36:47Z</dc:date>
    </item>
  </channel>
</rss>

