public void doSave() { checkNotNull(current); // FIXME: Should not allow a record w/o a "name" to be saved. // FIXME: Need to implement some sort of form validation // Copy the view details into the current document current.setId(view.getId()); current.setType(view.getType()); current.setName(view.getName()); current.setDescription(view.getDescription()); current.setContent(view.getContent()); // Save the document documentManagerLiaison.save(current); }
public void doCancel() { if (current == null) { return; } if (current.isNew()) { // clear temporal document and hide the view documentManagerLiaison.remove(current); view.clear(); view.asWidget().setVisible(false); attributesDataProvider.getList().clear(); current = null; } else { // reset the view to the current data setDocument(current); } }