@Override
public void setEntity(SpecimenTypeDesignation entity) {
super.setEntity(entity);
- Set<TaxonName> typifiedNames = entity.getTypifiedNames();
- if(typifiedNames.size()==1){
- selectionTaxonName.setEntity(typifiedNames.iterator().next());
+ if (combo_typeStatus != null){
+ Set<TaxonName> typifiedNames = entity.getTypifiedNames();
+ if(typifiedNames.size()==1){
+ selectionTaxonName.setEntity(typifiedNames.iterator().next());
+ }
+ else if(typifiedNames.size()>1){
+ formFactory.createLabel(getLayoutComposite(), "!!!!!!!!");
+ }
+
+ SpecimenTypeDesignationStatus typeStatus = HibernateProxyHelper
+ .deproxy(entity.getTypeStatus());
+ combo_typeStatus.setSelection(typeStatus);
+ checkbox_notDesignated.setSelection(entity.isNotDesignated());
}
- else if(typifiedNames.size()>1){
- formFactory.createLabel(getLayoutComposite(), "!!!!!!!!");
- }
-
- SpecimenTypeDesignationStatus typeStatus = HibernateProxyHelper
- .deproxy(entity.getTypeStatus());
- combo_typeStatus.setSelection(typeStatus);
- checkbox_notDesignated.setSelection(entity.isNotDesignated());
// for (TaxonNameBase taxonNameBase : typifiedNames) {
// EntitySelectionElement<TaxonNameBase> selectionElement = formFactory.createSelectionElement(
parentFormElement, "Designation Status", null, style);
super.createControls(element, style);
+ if (entity != null){
+ setEntity(entity);
+ }
}
/** {@inheritDoc} */