super.createControls(formElement, style);
externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ExternalLinksSection.class, IdentifiableSource.class.getCanonicalName()));
externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ if (entity != null){
+ setEntity(this.entity);
+ }
}
/** {@inheritDoc} */
@Override
public void setEntity(IdentifiableSource entity) {
super.setEntity(entity);
- if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowIdInSource.getKey())){
- text_idInSource.setText(entity.getIdInSource());
- }
- if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowNamespaceInSource.getKey())){
- text_idNamespace.setText(entity.getIdNamespace());
+ if (selection_reference != null){
+ if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowIdInSource.getKey())){
+ text_idInSource.setText(entity.getIdInSource());
+ }
+ if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowNamespaceInSource.getKey())){
+ text_idNamespace.setText(entity.getIdNamespace());
+ }
+
+ selection_reference.setEntity(entity.getCitation());
+ text_referenceDetail.setText(entity.getCitationMicroReference());
+ combo_origsourcetype.setSelection(entity.getType());
+ text_originaleNameString.setText(entity.getOriginalNameString());
}
- selection_reference.setEntity(entity.getCitation());
- text_referenceDetail.setText(entity.getCitationMicroReference());
- combo_origsourcetype.setSelection(entity.getType());
- text_originaleNameString.setText(entity.getOriginalNameString());
-
-
-
}
/** {@inheritDoc} */