Project

General

Profile

« Previous | Next » 

Revision dcf98348

Added by Patrick Plitzner almost 6 years ago

fix #4363 Show more informative message in details view for specimen

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
295 295
        } else if (input instanceof Media) {
296 296
            createMediaElementSection(rootElement);
297 297

  
298
        } else if (input instanceof DerivedUnitFacade) {
298
        }
299
        //FIXME hack to show more informative message to the user when
300
        //DerivedUnit has more than one FieldUnit #4363
301
        else if (input.getClass().equals(DerivedUnit.class)) {
302
            DerivedUnit derivedUnit = (DerivedUnit)input;
303
            try {
304
                input = DerivedUnitFacade.NewInstance(derivedUnit,
305
                        PreferencesUtil.getDerivedUnitConfigurator());
306
            } catch (DerivedUnitFacadeNotSupportedException e) {
307
                createEmptySection(e.getMessage(), rootElement);
308
            }
309
        }
310
        else if (input instanceof DerivedUnitFacade) {
299 311
            if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
300 312
                if(((DerivedUnitFacade) input).innerFieldUnit()==null){
301 313
                    MessagingUtils.error(DetailsViewerE4.class, "FieldUnit of facade is null", null); //$NON-NLS-1$

Also available in: Unified diff