PL-9044 Generated column in table is not editable if Table editable = false

This commit is contained in:
Yuriy Artamonov 2017-05-04 16:59:21 +04:00
parent b77968c5ee
commit bf9b9814d1
4 changed files with 11 additions and 5 deletions

View File

@ -225,8 +225,8 @@ public abstract class DesktopAbstractField<C extends JComponent> extends Desktop
this.editable = editable;
boolean parentEditable = true;
if (parent instanceof Editable) {
parentEditable = ((Editable) parent).isEditable();
if (parent instanceof ChildEditableController) {
parentEditable = ((ChildEditableController) parent).isEditable();
}
boolean finalEditable = parentEditable && editable;

View File

@ -507,6 +507,12 @@ public interface Component {
void setEditable(boolean editable);
}
/**
* Component that manages editable property of child components.
*/
interface ChildEditableController extends Editable {
}
/**
* Event that is fired when "editable" property of Editable component has been changed.
*/

View File

@ -29,7 +29,7 @@ import java.util.Map;
*/
public interface FieldGroup extends Component, Component.BelongToFrame, Component.HasCaption, Component.HasIcon,
Component.HasBorder, Component.Editable, Component.Validatable,
Component.EditableChangeNotifier {
Component.EditableChangeNotifier, Component.ChildEditableController {
String NAME = "fieldGroup";
/**

View File

@ -269,8 +269,8 @@ public abstract class WebAbstractField<T extends com.vaadin.ui.AbstractField>
this.editable = editable;
boolean parentEditable = true;
if (parent instanceof Editable) {
parentEditable = ((Editable) parent).isEditable();
if (parent instanceof ChildEditableController) {
parentEditable = ((ChildEditableController) parent).isEditable();
}
boolean finalEditable = parentEditable && editable;