public void onSave(String xml) {
if(null==selectedDialog) return;
try {
DialogXML parser = new DialogXML();
// validation
Dialog dialog = parser.unmarshall(xml);
final Document document = parser.marshall(dialog);
vfs.save(selectedDialog, ModelEditor.formatXml(document.toString()), new SimpleCallback<Boolean>() {
@Override
public void onSuccess(Boolean result) {
Console.info("Successfully saved "+selectedDialog.getName());