|
|
|
@ -245,7 +245,7 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|
|
|
|
StringBuilder valueBuilder = new StringBuilder();
|
|
|
|
|
valueBuilder.append("[");
|
|
|
|
|
for (int i = 0; i < valueCollection.size(); i++) {
|
|
|
|
|
valueBuilder.append(parseString(valueCollection.stream().toArray()[i]));
|
|
|
|
|
valueBuilder.append("\"").append(valueCollection.toArray()[i]).append("\"");
|
|
|
|
|
if (i < valueCollection.size() - 1) {
|
|
|
|
|
valueBuilder.append(", ");
|
|
|
|
|
}
|
|
|
|
@ -264,13 +264,4 @@ public class Field implements Comparable, PropertiesModelBuilder, ViewStyleDefin
|
|
|
|
|
public void toMap(Map<String, Object> fieldValues, int index) {
|
|
|
|
|
fieldValues.put(this.id, this.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String parseString(Object value) {
|
|
|
|
|
if (value instanceof String) {
|
|
|
|
|
if (((String)value).contains(",")) {
|
|
|
|
|
return "\"" + value + "\"";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return value.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|