null, EntitySelectionElement.SELECTABLE|EntitySelectionElement.EDITABLE, style);
text_referenceDetail = formFactory.createTextWithLabelElement(
formElement, "Reference Detail", null, SWT.NULL);
+ if (entity != null){
+ setEntity(entity);
+ }
}
@Override
public void setEntity(Reference entity) {
this.entity = entity;
- selection_reference.setEntity(entity);
- text_referenceDetail.setText(entity.getReferenceAbstract());
+ if(selection_reference != null){
+ selection_reference.setEntity(entity);
+ text_referenceDetail.setText(entity.getReferenceAbstract());
+ }
+
}
@Override