if (isUpdate) {
updateService.update(dto, new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {
eventBus.fireEvent(new UpdateEvent(module));
eventBus.fireEvent(new OpenEvent(dto));
}
@Override
public void onFailure(Throwable caught) {
}
});
} else {
createService.create(dto, new AsyncCallback<Long>() {
@Override
public void onSuccess(Long result) {
dto.setId(result);
eventBus.fireEvent(new UpdateEvent(module));
eventBus.fireEvent(new OpenEvent(dto));
}
@Override
public void onFailure(Throwable caught) {