Revision 6702c7e1
Added by Andreas Kohlbecker almost 7 years ago
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java | ||
---|---|---|
41 | 41 |
import com.vaadin.ui.VerticalLayout; |
42 | 42 |
import com.vaadin.ui.themes.ValoTheme; |
43 | 43 |
|
44 |
import eu.etaxonomy.cdm.database.PermissionDeniedException; |
|
44 | 45 |
import eu.etaxonomy.vaadin.component.NestedFieldGroup; |
45 | 46 |
import eu.etaxonomy.vaadin.component.SwitchableTextField; |
46 | 47 |
import eu.etaxonomy.vaadin.ui.view.DoneWithPopupEvent; |
... | ... | |
181 | 182 |
FieldGroupInvalidValueException invalidValueException = (FieldGroupInvalidValueException)e.getCause(); |
182 | 183 |
updateFieldNotifications(invalidValueException.getInvalidFields()); |
183 | 184 |
Notification.show("The entered data in " + invalidValueException.getInvalidFields().size() + " fields is incomplete or invalid."); |
184 |
} else { |
|
185 |
} else if(e.getCause() != null && e.getCause().getCause() != null && e.getCause().getCause() instanceof PermissionDeniedException){ |
|
186 |
PermissionDeniedException permissionDeniedException = (PermissionDeniedException)e.getCause().getCause(); |
|
187 |
Notification.show("Permission denied", permissionDeniedException.getMessage(), Type.ERROR_MESSAGE); |
|
188 |
} |
|
189 |
else { |
|
185 | 190 |
Logger.getLogger(this.getClass()).error("Error saving", e); |
186 | 191 |
Notification.show("Error saving", Type.ERROR_MESSAGE); |
187 | 192 |
} |
Also available in: Unified diff
ref #6169 basic TaxonName popup editor