<?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: Java code to set a complex property in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/java-code-to-set-a-complex-property/m-p/323892#M10893</link>
    <description>&lt;P&gt;For example:
To put "wishedValue1" and "wishedValue2" into subfields "fieldName1" and "fieldName2" of "metadataName" (in "schemaPrefix") which is complex and multivalued:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;	List&amp;lt;Map&amp;lt;String, Object&amp;gt;&amp;gt; complexValuesList = new ArrayList&amp;lt;Map&amp;lt;String, Object&amp;gt;&amp;gt;();
	Map&amp;lt;String, Object&amp;gt; complexValue = new HashMap&amp;lt;String, Object&amp;gt;();
	complexValue.put("fieldName1", "wishedValue1");
	complexValue.put("fieldName2", "wishedValue2");
	complexValuesList.add(complexValue);
	customDocType.setPropertyValue("schemaPrefix:metadataName", (Serializable) complexValuesList);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could find another example there:
&lt;A href="https://answers.nuxeo.com/general/q/c1d1279ec8b745089bcd0fd06daea3fa/How-to-programatically-populate-Complex-Multivalued-Fields" target="test_blank"&gt;https://answers.nuxeo.com/general/q/c1d1279ec8b745089bcd0fd06daea3fa/How-to-programatically-populate-Complex-Multivalued-Fields&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Nov 2015 16:43:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-11-27T16:43:37Z</dc:date>
    <item>
      <title>Java code to set a complex property</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/java-code-to-set-a-complex-property/m-p/323891#M10892</link>
      <description>&lt;P&gt;I have a property that can be multivalue and each value is a complex property that contains two string subproperty.&lt;/P&gt;
&lt;P&gt;Can someone give me an example of java code to set this type of property?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2015 14:46:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/java-code-to-set-a-complex-property/m-p/323891#M10892</guid>
      <dc:creator>marco_altieri_7</dc:creator>
      <dc:date>2015-02-27T14:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Java code to set a complex property</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/java-code-to-set-a-complex-property/m-p/323892#M10893</link>
      <description>&lt;P&gt;For example:
To put "wishedValue1" and "wishedValue2" into subfields "fieldName1" and "fieldName2" of "metadataName" (in "schemaPrefix") which is complex and multivalued:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;	List&amp;lt;Map&amp;lt;String, Object&amp;gt;&amp;gt; complexValuesList = new ArrayList&amp;lt;Map&amp;lt;String, Object&amp;gt;&amp;gt;();
	Map&amp;lt;String, Object&amp;gt; complexValue = new HashMap&amp;lt;String, Object&amp;gt;();
	complexValue.put("fieldName1", "wishedValue1");
	complexValue.put("fieldName2", "wishedValue2");
	complexValuesList.add(complexValue);
	customDocType.setPropertyValue("schemaPrefix:metadataName", (Serializable) complexValuesList);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could find another example there:
&lt;A href="https://answers.nuxeo.com/general/q/c1d1279ec8b745089bcd0fd06daea3fa/How-to-programatically-populate-Complex-Multivalued-Fields" target="test_blank"&gt;https://answers.nuxeo.com/general/q/c1d1279ec8b745089bcd0fd06daea3fa/How-to-programatically-populate-Complex-Multivalued-Fields&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2015 16:43:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/java-code-to-set-a-complex-property/m-p/323892#M10893</guid>
      <dc:creator />
      <dc:date>2015-11-27T16:43:37Z</dc:date>
    </item>
  </channel>
</rss>

