<?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 create document into the Default Domain ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-document-into-the-default-domain/m-p/322723#M9724</link>
    <description>&lt;P&gt;Yes, Nuxeo guys don't like to let you create document into Domain. This is not fair...&lt;/P&gt;
&lt;P&gt;But I can help you to that  and thanks Alain for my karma...&lt;/P&gt;
&lt;P&gt;In fact there is a filter that hide the "New document" action for Domain documents.&lt;/P&gt;
&lt;P&gt;To make the "new Document" button appear, you can create your own action with the same configuration of the default new document type but with a different filter (ugly way) or just appends to the filter used by the "New Document" action to let it displayed for Domains (clean way).&lt;/P&gt;
&lt;P&gt;So the for the clean way, you just have to add the following XML extension in Studio (Project &amp;gt; Advanced Settings &amp;gt; XML Extensions):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="filters"&amp;gt;
    &amp;lt;filter id="create" append="true"&amp;gt;
      &amp;lt;rule grant="true"&amp;gt;
        &amp;lt;permission&amp;gt;AddChildren&amp;lt;/permission&amp;gt;
        &amp;lt;type&amp;gt;Domain&amp;lt;/type&amp;gt;
        &amp;lt;condition&amp;gt;#{typeManager.getAllowedSubTypes(document.getType(), document).size() &amp;gt; 0}&amp;lt;/condition&amp;gt;
      &amp;lt;/rule&amp;gt;
    &amp;lt;/filter&amp;gt;
  &amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or if you are tired and don't want to make it clean &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension point="actions" target="org.nuxeo.ecm.platform.actions.ActionService"&amp;gt; 
     &amp;lt;action icon="/icons/action_add.gif" id="newDocumentBis" label="action.new.document" link="javascript:Richfaces.showModalPanel('selectDocTypePanel');"&amp;gt;
    &amp;lt;category&amp;gt;SUBVIEW_UPPER_LIST_HREF&amp;lt;/category&amp;gt;

    &amp;lt;filter id="customAdditionalRuleForNewDocumentButton"&amp;gt;
      &amp;lt;rule grant="true"&amp;gt;
        &amp;lt;permission&amp;gt;AddChildren&amp;lt;/permission&amp;gt;
        &amp;lt;type&amp;gt;Domain&amp;lt;/type&amp;gt;
      &amp;lt;/rule&amp;gt;
  &amp;lt;/filter&amp;gt;
&amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you want to override or copy the behavior of a link, you can have a look at the contributed links &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20DM-5.4.2/viewContribution/org.nuxeo.ecm.platform.actions--actions"&gt;here&lt;/A&gt; and, exhaustively &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20DM-5.4.2/viewExtensionPoint/org.nuxeo.ecm.platform.actions.ActionService--actions"&gt;there&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2012 17:11:47 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2012-01-02T17:11:47Z</dc:date>
    <item>
      <title>How to create document into the Default Domain ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-document-into-the-default-domain/m-p/322722#M9723</link>
      <description>&lt;P&gt;I create a new doc type into Studio, and I deploy it into my Nuxeo instance.&lt;/P&gt;
&lt;P&gt;When I navigate into the Default Domain, there is no New Document button and I have no way to create my document type.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2012 16:16:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-document-into-the-default-domain/m-p/322722#M9723</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-02T16:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create document into the Default Domain ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-document-into-the-default-domain/m-p/322723#M9724</link>
      <description>&lt;P&gt;Yes, Nuxeo guys don't like to let you create document into Domain. This is not fair...&lt;/P&gt;
&lt;P&gt;But I can help you to that  and thanks Alain for my karma...&lt;/P&gt;
&lt;P&gt;In fact there is a filter that hide the "New document" action for Domain documents.&lt;/P&gt;
&lt;P&gt;To make the "new Document" button appear, you can create your own action with the same configuration of the default new document type but with a different filter (ugly way) or just appends to the filter used by the "New Document" action to let it displayed for Domains (clean way).&lt;/P&gt;
&lt;P&gt;So the for the clean way, you just have to add the following XML extension in Studio (Project &amp;gt; Advanced Settings &amp;gt; XML Extensions):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="filters"&amp;gt;
    &amp;lt;filter id="create" append="true"&amp;gt;
      &amp;lt;rule grant="true"&amp;gt;
        &amp;lt;permission&amp;gt;AddChildren&amp;lt;/permission&amp;gt;
        &amp;lt;type&amp;gt;Domain&amp;lt;/type&amp;gt;
        &amp;lt;condition&amp;gt;#{typeManager.getAllowedSubTypes(document.getType(), document).size() &amp;gt; 0}&amp;lt;/condition&amp;gt;
      &amp;lt;/rule&amp;gt;
    &amp;lt;/filter&amp;gt;
  &amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or if you are tired and don't want to make it clean &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;extension point="actions" target="org.nuxeo.ecm.platform.actions.ActionService"&amp;gt; 
     &amp;lt;action icon="/icons/action_add.gif" id="newDocumentBis" label="action.new.document" link="javascript:Richfaces.showModalPanel('selectDocTypePanel');"&amp;gt;
    &amp;lt;category&amp;gt;SUBVIEW_UPPER_LIST_HREF&amp;lt;/category&amp;gt;

    &amp;lt;filter id="customAdditionalRuleForNewDocumentButton"&amp;gt;
      &amp;lt;rule grant="true"&amp;gt;
        &amp;lt;permission&amp;gt;AddChildren&amp;lt;/permission&amp;gt;
        &amp;lt;type&amp;gt;Domain&amp;lt;/type&amp;gt;
      &amp;lt;/rule&amp;gt;
  &amp;lt;/filter&amp;gt;
&amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you want to override or copy the behavior of a link, you can have a look at the contributed links &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20DM-5.4.2/viewContribution/org.nuxeo.ecm.platform.actions--actions"&gt;here&lt;/A&gt; and, exhaustively &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20DM-5.4.2/viewExtensionPoint/org.nuxeo.ecm.platform.actions.ActionService--actions"&gt;there&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2012 17:11:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-create-document-into-the-default-domain/m-p/322723#M9724</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-01-02T17:11:47Z</dc:date>
    </item>
  </channel>
</rss>

