/**
* @author freimeier
- *
*/
public class HibernateExceptionHandler extends ErrorTypeHandler<HibernateException>{
private static final long serialVersionUID = -5703485298578474572L;
- /**
- * {@inheritDoc}
- */
@Override
public Class<HibernateException> supports() {
return HibernateException.class;
}
- /**
- * {@inheritDoc}
- */
@Override
public void error(ErrorEvent event) {
// not needed in this class so far
notification.show(Page.getCurrent());
}
}
-
-
-
-}
+}
\ No newline at end of file
/**
* @author a.kohlbecker
* @since Apr 2, 2019
- *
*/
public class PermissionDeniedErrorHandler implements ErrorHandler {
this.ui = ui;
}
- /**
- * {@inheritDoc}
- */
@Override
public void error(ErrorEvent event) {
PermissionDeniedException permissionDeniedException = (PermissionDeniedException)event.getThrowable();
-
Notification.show("Permission denied", permissionDeniedException.getMessage(), Type.ERROR_MESSAGE);
-
}
-
-}
+}
\ No newline at end of file
}
return state;
}
-
-// @Override
-// public void setEnabled(boolean state) {
-// this.enabled = state;
-// }
-//
-// @Override
-// public boolean isEnabled() {
-// return enabled;
-// }
-
-
}
\ No newline at end of file
unbindField(oldField);
addField(newField, propertyId, column1, row1, column2, row2);
- getViewEventBus().publish(this, new FieldReplaceEvent(this, oldField, newField));
+ getViewEventBus().publish(this, new FieldReplaceEvent<>(this, oldField, newField));
// important: set newField value at last!
newField.setValue(value);
return newField;