Project

General

Profile

Revision 2ffe661a

ID2ffe661a7f2e2bda261adf9343a2bd94e9a23ffb
Parent 589e5b35
Child 9c239e1b

Added by Andreas Kohlbecker over 2 years ago

minor refactoring to clarify code

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
49 49
import eu.etaxonomy.cdm.vaadin.ui.RegistrationUIDefaults;
50 50
import eu.etaxonomy.cdm.vaadin.util.CdmTitleCacheCaptionGenerator;
51 51
import eu.etaxonomy.cdm.vaadin.view.reference.ReferencePopupEditor;
52
import eu.etaxonomy.vaadin.component.ReloadableLazyComboBox;
52 53
import eu.etaxonomy.vaadin.component.ReloadableSelect;
53 54
import eu.etaxonomy.vaadin.mvp.AbstractCdmEditorPresenter;
54 55
import eu.etaxonomy.vaadin.mvp.BeanInstantiator;
......
375 376
            return;
376 377
        }
377 378

  
378
        basionymSourceField = (AbstractField<TaxonName>)event.getSourceComponent();
379
        basionymSourceField = (ReloadableLazyComboBox<TaxonName>)event.getSourceComponent();
379 380

  
380 381
        basionymNamePopup = getNavigationManager().showInPopup(TaxonNamePopupEditor.class, getView());
381 382
        basionymNamePopup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
45 45
import eu.etaxonomy.cdm.vaadin.security.UserHelper;
46 46
import eu.etaxonomy.cdm.vaadin.util.TeamOrPersonBaseCaptionGenerator;
47 47
import eu.etaxonomy.cdm.vaadin.util.converter.SetToListConverter;
48
import eu.etaxonomy.vaadin.component.ReloadableLazyComboBox;
48 49
import eu.etaxonomy.vaadin.component.SwitchableTextField;
49 50
import eu.etaxonomy.vaadin.component.ToManyRelatedEntitiesComboboxSelect;
50 51
import eu.etaxonomy.vaadin.component.ToOneRelatedEntityCombobox;
......
324 325
                beanUuid = ((CdmBase)fieldValue).getUuid();
325 326

  
326 327
            }
327
            getViewEventBus().publish(this, new TaxonNameEditorAction(e.getAction(), beanUuid, e.getSource(), this));
328
            ReloadableLazyComboBox<TaxonName>  lazyCombobox = (ReloadableLazyComboBox<TaxonName>) e.getSource();
329
            getViewEventBus().publish(this, new TaxonNameEditorAction(e.getAction(), beanUuid, lazyCombobox, this));
328 330
        });
329 331
        grid.setComponentAlignment(basionymsComboboxSelect, Alignment.TOP_RIGHT);
330 332
        row++;
src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java
408 408
            if(withEditButton){
409 409
                addButtonIndex++;
410 410
                // edit
411
                ((Button)buttonGroup.getComponent(0)).setDescription(field.getValue() == null ? "New" : "Edit");
412
                buttonGroup.getComponent(0).setEnabled(field.getValue() == null
411
                Button editCreateButton = ((Button)buttonGroup.getComponent(0));
412
                editCreateButton.setDescription(field.getValue() == null ? "New" : "Edit");
413
                editCreateButton.setEnabled(field.getValue() == null
413 414
                        || field.getValue() != null && testEditButtonPermission(field.getValue()));
414 415
            }
415 416
            // add

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)