<?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: Support multiple schemas in drag and drop import with metadata in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/support-multiple-schemas-in-drag-and-drop-import-with-metadata/m-p/317459#M4460</link>
    <description>&lt;P&gt;I finally overrode the DndFormActionBean with the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public List&amp;lt;String&amp;gt; getSchema() {
    if (schema != null &amp;amp;&amp;amp; !schema.isEmpty()) {
        String[] schemas = schema.split(",");
        currentSchema = new ArrayList&amp;lt;String&amp;gt;(schemas.length);
        Collections.addAll(currentSchema, schemas);
    }
    return currentSchema;
}

(...)

@Factory(value = "dataCollector", scope = ScopeType.PAGE)
public Map&amp;lt;String, Map&amp;lt;String, Serializable&amp;gt;&amp;gt; getCollector() {
    if (metadataCollector == null) {
        metadataCollector = new HashMap&amp;lt;String, Map&amp;lt;String, Serializable&amp;gt;&amp;gt;();
        for (String schema : getSchema()) {
            metadataCollector.put(schema,
                new HashMap&amp;lt;String, Serializable&amp;gt;());
        }
    }
    return metadataCollector;
} 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This supports a comma-separated list of schemas in the action link parameters. It seems to work.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2012 12:25:16 GMT</pubDate>
    <dc:creator>schambon_</dc:creator>
    <dc:date>2012-08-09T12:25:16Z</dc:date>
    <item>
      <title>Support multiple schemas in drag and drop import with metadata</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/support-multiple-schemas-in-drag-and-drop-import-with-metadata/m-p/317458#M4459</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;My documents use multiple schemas (quite a typical case I&amp;nbsp;think, with dublincore + custom schema). I want to customize the "intelligent import" form to show items from these multiple schemas - rather like the "create" form without drag and drop.&lt;/P&gt;
&lt;P&gt;I have found &lt;A href="http://answers.nuxeo.com/questions/1660/comment-je-modifie-le-formulaire-propose-au-moment-du-dragn-drop"&gt;this question&lt;/A&gt; which shows how to customize the form, unfortunately this only supports a single schema so I have to pick between dc and (one of) my custom schema(s).&lt;/P&gt;
&lt;P&gt;Apart from hacking DndFormActionBean, is there any way to work around this limitation?&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 12:03:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/support-multiple-schemas-in-drag-and-drop-import-with-metadata/m-p/317458#M4459</guid>
      <dc:creator>schambon_</dc:creator>
      <dc:date>2012-08-09T12:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Support multiple schemas in drag and drop import with metadata</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/support-multiple-schemas-in-drag-and-drop-import-with-metadata/m-p/317459#M4460</link>
      <description>&lt;P&gt;I finally overrode the DndFormActionBean with the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public List&amp;lt;String&amp;gt; getSchema() {
    if (schema != null &amp;amp;&amp;amp; !schema.isEmpty()) {
        String[] schemas = schema.split(",");
        currentSchema = new ArrayList&amp;lt;String&amp;gt;(schemas.length);
        Collections.addAll(currentSchema, schemas);
    }
    return currentSchema;
}

(...)

@Factory(value = "dataCollector", scope = ScopeType.PAGE)
public Map&amp;lt;String, Map&amp;lt;String, Serializable&amp;gt;&amp;gt; getCollector() {
    if (metadataCollector == null) {
        metadataCollector = new HashMap&amp;lt;String, Map&amp;lt;String, Serializable&amp;gt;&amp;gt;();
        for (String schema : getSchema()) {
            metadataCollector.put(schema,
                new HashMap&amp;lt;String, Serializable&amp;gt;());
        }
    }
    return metadataCollector;
} 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This supports a comma-separated list of schemas in the action link parameters. It seems to work.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 12:25:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/support-multiple-schemas-in-drag-and-drop-import-with-metadata/m-p/317459#M4460</guid>
      <dc:creator>schambon_</dc:creator>
      <dc:date>2012-08-09T12:25:16Z</dc:date>
    </item>
  </channel>
</rss>

