[ http://jira.magnolia.info/browse/MAGNOLIA-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Joseph reassigned MAGNOLIA-1465: ---------------------------------------- Assignee: Teresa Miyar (was: Sameer Charles) Thanks Oliver ! We're finally starting to look into this and your patches are of great help :) > adds multiple value handling for properties (NodeData) > ------------------------------------------------------ > > Key: MAGNOLIA-1465 > URL: http://jira.magnolia.info/browse/MAGNOLIA-1465 > Project: Magnolia > Issue Type: Improvement > Components: core, gui > Affects Versions: 3.1 M1 > Reporter: Oliver Lietz > Assignee: Teresa Miyar > Attachments: Content.java.diff, ControlImpl.java.diff, > DialogControlImpl.java.diff, NodeData.java.diff, NodeDataUtil.java.diff > > > lets you save and get properties with multiple values > To save a property with multiple values you need a custom SaveHandlerImpl > (this is java5 for client project): > protected void processMultiple(Content content, String name, int type, > String[] strings) throws RepositoryException, > PathNotFoundException, AccessDeniedException { > List<Value> values = new ArrayList<Value>(); > NodeData data = NodeDataUtil.getOrCreate(content, name); > if (strings != null && strings.length != 0) { > for (String string : strings) { > Value value = getValue(string, type); > if (value != null) { > values.add(value); > } > } > data.setValue(values.toArray(new Value[values.size()])); > } else { > data.delete(); > } > } > So there should be a switch for multiple nodes and multiple values later in > related classes. > XML export looks like so: > <sv:property sv:name="product:colors" sv:type="String"> > <sv:value>black</sv:value> > <sv:value>blue</sv:value> > </sv:property> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.magnolia.info/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ----------------------------------------------------------------