Browse Source

无JIRA任务 防止有npe

master
zack 8 years ago
parent
commit
752e05ecd5
  1. 8
      designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java

8
designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java

@ -29,14 +29,18 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
protected void populateSubFieldEditorBean(TreeEditor e) { protected void populateSubFieldEditorBean(TreeEditor e) {
this.treeSettingPane.populate(e); this.treeSettingPane.populate(e);
treeRootPane.populate(e.getTreeAttr()); treeRootPane.populate(e.getTreeAttr());
this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat()); if (this.removeRepeatCheckBox != null) {
this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat());
}
} }
@Override @Override
protected TreeEditor updateSubFieldEditorBean() { protected TreeEditor updateSubFieldEditorBean() {
TreeEditor editor = treeSettingPane.updateTreeEditor(); TreeEditor editor = treeSettingPane.updateTreeEditor();
editor.setTreeAttr(treeRootPane.update()); editor.setTreeAttr(treeRootPane.update());
editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected()); if (this.removeRepeatCheckBox != null) {
editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected());
}
return editor; return editor;
} }

Loading…
Cancel
Save