Project

General

Profile

« Previous | Next » 

Revision feb81cbe

Added by Patrick Plitzner over 9 years ago

  • adapted details views and wizards to cdm changes (amplifaction + amplification result)
    • added missing parameters to details views

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/DnaSampleGeneralDetailElement.java
35 35

  
36 36
    private EntitySelectionElement<Institution> selectionInstitution;
37 37
    private EntitySelectionElement<AgentBase> selectionStaff;
38
    private TimePeriodElement datePreservationDate;
38
    private TimePeriodElement datePreparationDate;
39 39
    private NumberWithLabelElement numberPreservationTemperature;
40 40
    private TermComboElement<DefinedTerm> comboMaterialOrMethods;
41 41
    private TextWithLabelElement textBarcode;
......
62 62
        AgentBase<?> staff = null;
63 63
        TimePeriod preparationDate = null;
64 64
        if(entity.getDerivedFrom()!=null){
65
//            institution = entity.getDerivedFrom().getInstitution();
65
            institution = entity.getDerivedFrom().getInstitution();
66 66
            staff = entity.getDerivedFrom().getActor();
67 67
            preparationDate = entity.getDerivedFrom().getTimeperiod();
68 68
        }
......
73 73
            temperature = entity.getPreservation().getTemperature();
74 74
            definedMaterialOrMethod = entity.getPreservation().getDefinedMaterialOrMethod();
75 75
        }
76
        //TODO institution
77
//        selectionInstitution = formFactory.createSelectionElement(Institution.class, getConversationHolder(), formElement, "Institution", staff, EntitySelectionElement.ALL, style);
76
        selectionInstitution = formFactory.createSelectionElement(Institution.class, getConversationHolder(), formElement, "Institution", institution, EntitySelectionElement.ALL, style);
78 77
        selectionStaff = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement, "Staff", staff, EntitySelectionElement.ALL, style);
79
        datePreservationDate = formFactory.createTimePeriodElement(formElement, "Preparation date", preparationDate, style);
78
        datePreparationDate = formFactory.createTimePeriodElement(formElement, "Preparation date", preparationDate, style);
80 79
        numberPreservationTemperature = formFactory.createNumberTextWithLabelElement(formElement, "Preservation Temp. [C°]", temperature, style);
81 80
        comboMaterialOrMethods = formFactory.createDefinedTermComboElement(TermType.MaterialOrMethod, formElement, "Materials & Methods", definedMaterialOrMethod, style);
82 81
        textBarcode = formFactory.createTextWithLabelElement(formElement, "Barcode", entity.getBarcode(), style);
......
93 92
     */
94 93
    @Override
95 94
    public void handleEvent(Object eventSource) {
96
        if(eventSource==datePreservationDate){
97
            addPreservationMethod().setTimeperiod(datePreservationDate.getTimePeriod());
95
        if(eventSource==datePreparationDate){
96
            if(getEntity().getDerivedFrom()!=null){
97
                getEntity().getDerivedFrom().setTimeperiod(datePreparationDate.getTimePeriod());
98
            }
99
        }
100
        else if(eventSource==selectionInstitution){
101
            if(getEntity().getDerivedFrom()!=null){
102
                getEntity().getDerivedFrom().setInstitution(selectionInstitution.getSelection());
103
            }
98 104
        }
99 105
        else if(eventSource==selectionStaff){
100
            addPreservationMethod().setActor(selectionStaff.getSelection());
106
            if(getEntity().getDerivedFrom()!=null){
107
                getEntity().getDerivedFrom().setActor(selectionStaff.getSelection());
108
            }
101 109
        }
102 110
        else if(eventSource==numberPreservationTemperature){
103 111
            addPreservationMethod().setTemperature(numberPreservationTemperature.getDouble());

Also available in: Unified diff