Revision 5ba148ae
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java | ||
---|---|---|
141 | 141 |
|
142 | 142 |
@Override |
143 | 143 |
public void preCommit(CommitEvent commitEvent) throws CommitException { |
144 |
logger.debug("preCommit"); |
|
145 |
// notify the presenter to start a transaction |
|
146 |
eventBus.publishEvent(new EditorPreSaveEvent(commitEvent)); |
|
144 | 147 |
} |
145 | 148 |
|
146 | 149 |
@Override |
147 | 150 |
public void postCommit(CommitEvent commitEvent) throws CommitException { |
148 | 151 |
try { |
149 |
// notify the presenter to persist the bean |
|
152 |
// notify the presenter to persist the bean and to commit the transaction
|
|
150 | 153 |
eventBus.publishEvent(new EditorSaveEvent(commitEvent)); |
151 | 154 |
|
152 | 155 |
// notify the NavigationManagerBean to close the window and to dispose the view |
... | ... | |
171 | 174 |
try { |
172 | 175 |
fieldGroup.commit(); |
173 | 176 |
} catch (CommitException e) { |
174 |
fieldGroup.getFields().forEach(f -> ((AbstractField)f).setValidationVisible(true)); |
|
177 |
fieldGroup.getFields().forEach(f -> ((AbstractField<?>)f).setValidationVisible(true));
|
|
175 | 178 |
if(e.getCause() != null && e.getCause() instanceof FieldGroupInvalidValueException){ |
176 | 179 |
FieldGroupInvalidValueException invalidValueException = (FieldGroupInvalidValueException)e.getCause(); |
177 | 180 |
updateFieldNotifications(invalidValueException.getInvalidFields()); |
Also available in: Unified diff
ref #6169 generic AbstractCdmEditorPresenter wihout LazyInitializationExeption problems