-
Improvement
-
Resolution: Fixed
-
Major
-
3.1 M1
-
None
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)
}
data.setValue(values.toArray(new Value[values.size()]));
} else
}
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>
- is superseded by
-
MAGNOLIA-2363 core: multivalue support
- Closed