As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I have a property that can be multivalue and each value is a complex property that contains two string subproperty.
Can someone give me an example of java code to set this type of property?
For example: To put "wishedValue1" and "wishedValue2" into subfields "fieldName1" and "fieldName2" of "metadataName" (in "schemaPrefix") which is complex and multivalued:
List<Map<String, Object>> complexValuesList = new ArrayList<Map<String, Object>>(); Map<String, Object> complexValue = new HashMap<String, Object>(); complexValue.put("fieldName1", "wishedValue1"); complexValue.put("fieldName2", "wishedValue2"); complexValuesList.add(complexValue); customDocType.setPropertyValue("schemaPrefix:metadataName", (Serializable) complexValuesList);
You could find another example there: https://answers.nuxeo.com/general/q/c1d1279ec8b745089bcd0fd06daea3fa/How-to-programatically-populate-Complex-Multivalued-Fields