event.getForm().saveData(new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
Record rec = response.getData()[0];
JavaScriptObject rawItems = rec.getAttributeAsJavaScriptObject("items");
String html = StringUtil.asHTML(new JSONEncoder().encode(rawItems));
SC.say("Record saved with items:" + html);
}
});
}
});