Project

General

Profile

« Previous | Next » 

Revision bc5816ee

Added by Andreas Kohlbecker almost 7 years ago

ref #6612 Team and Person editor widgets implemented and integrated in reference editor

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferencePopupEditor.java
22 22

  
23 23
import eu.etaxonomy.cdm.model.reference.Reference;
24 24
import eu.etaxonomy.cdm.model.reference.ReferenceType;
25
import eu.etaxonomy.cdm.vaadin.component.common.TeamOrPersonField;
25 26
import eu.etaxonomy.cdm.vaadin.component.common.TimePeriodField;
26 27
import eu.etaxonomy.cdm.vaadin.security.AccessRestrictedView;
27 28
import eu.etaxonomy.vaadin.mvp.AbstractCdmPopupEditor;
......
42 43

  
43 44
    private final static int GRID_COLS = 4;
44 45

  
45
    private final static int GRID_ROWS = 9;
46
    private final static int GRID_ROWS = 10;
46 47

  
47 48
    /**
48 49
     * @param layout
......
91 92
        addSwitchableTextField("Abbrev. cache", "abbrevTitleCache", "protectedAbbrevTitleCache", 0, row, GRID_COLS-1, row).setWidth(100, Unit.PERCENTAGE);
92 93
        row++;
93 94
        titleField = addTextField("Title", "title", 0, row, GRID_COLS-1, row);
94
        titleField.setRequired(true);
95 95
        titleField.setWidth(100, Unit.PERCENTAGE);
96 96
        row++;
97 97
        addTextField("NomenclaturalTitle", "abbrevTitle", 0, row, GRID_COLS-1, row).setWidth(100, Unit.PERCENTAGE);
98 98
        row++;
99
        // addTextField("Author(s)", "authorship", 0, 4, 1, 4)).setRequired(true);
100
        addTextField("Editor", "editor", 2, row, 3, row).setWidth(100, Unit.PERCENTAGE);
99
        TeamOrPersonField authorshipField = new TeamOrPersonField("Author(s)");
100
        authorshipField.setWidth(100,  Unit.PERCENTAGE);
101
        addField(authorshipField, "authorship", 0, row, 3, row);
101 102
        row++;
102 103
        addTextField("Series", "seriesPart", 0, row);
103 104
        addTextField("Volume", "volume", 1, row);
104 105
        addTextField("Pages", "pages", 2, row);
106
        addTextField("Editor", "editor", 3, row).setWidth(100, Unit.PERCENTAGE);
105 107
        row++;
106 108
        addTextField("Place published", "placePublished", 0, row, 1, row).setWidth(100, Unit.PERCENTAGE);
107 109
        TextField publisherField = addTextField("Publisher", "publisher", 2, row, 3, row);
108
        publisherField.setRequired(true);
109 110
        publisherField.setWidth(100, Unit.PERCENTAGE);
110 111
        TimePeriodField timePeriodField = new TimePeriodField("Date published");
111 112
        addField(timePeriodField, "datePublished");
112 113
        row++;
113
        // TODO implement a TimePeriod component
114 114
        addTextField("ISSN", "issn", 0, row);
115 115
        addTextField("ISBN", "isbn", 1, row);
116 116
        addTextField("DOI", "doi", 2, row);
117 117
        addTextField("Uri", "uri", 3, row);
118 118

  
119
//        titleField.setRequired(true);
120
//        publisherField.setRequired(true);
121

  
119 122
    }
120 123

  
121 124
    /**

Also available in: Unified diff