combo_annotationType = formFactory.createDefinedTermComboElement(TermType.AnnotationType, this, "Annotation Type", null, style);
text = formFactory.createMultiLineTextWithLabel(this, "Annotation", 100, style);
+ if (entity != null){
+ setEntity(entity);
+ }
}
@Override
public void setEntity(Annotation entity) {
this.entity = entity;
- combo_annotationType.setSelection(getEntity().getAnnotationType());
- text.setText(entity.getText());
+ if (combo_annotationType != null){
+ combo_annotationType.setSelection(getEntity().getAnnotationType());
+ text.setText(entity.getText());
+ }
}
@Override