Revision 3baf1767
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/SpecimenTypeDesignationWorkingsetPopupEditor.java | ||
---|---|---|
169 | 169 |
// FIXME: can we use the Grid instead? |
170 | 170 |
typeDesignationsCollectionField = new ElementCollectionField<>( |
171 | 171 |
SpecimenTypeDesignationDTO.class, |
172 |
//getPresenter().specimenTypeDesignationDTOInstantiator(getBean()); |
|
173 | 172 |
SpecimenTypeDesignationDTORow.class |
174 | 173 |
); |
175 | 174 |
typeDesignationsCollectionField.withCaption("Types"); |
176 | 175 |
typeDesignationsCollectionField.getLayout().setSpacing(false); |
177 | 176 |
typeDesignationsCollectionField.getLayout().setColumns(3); |
178 | 177 |
|
178 |
typeDesignationsCollectionField.setVisibleProperties(SpecimenTypeDesignationDTORow.visibleFields()); |
|
179 |
|
|
179 | 180 |
typeDesignationsCollectionField.setPropertyHeader("accessionNumber", "Access. num."); |
180 | 181 |
typeDesignationsCollectionField.setPropertyHeader("preferredStableUri", "Stable URI"); |
181 | 182 |
typeDesignationsCollectionField.setPropertyHeader("mediaSpecimenReference", "Image reference"); |
... | ... | |
274 | 275 |
super.afterItemDataSourceSet(); |
275 | 276 |
GridLayout gridLayout = this.typeDesignationsCollectionField.getLayout(); |
276 | 277 |
for(int rowIndex = 1; rowIndex < gridLayout.getRows(); rowIndex++){ // first row is header |
277 |
Component item = gridLayout.getComponent(0, rowIndex);
|
|
278 |
Component item = gridLayout.getComponent(SpecimenTypeDesignationDTORow.rowListSelectColumn(), rowIndex);
|
|
278 | 279 |
((CollectionRowRepresentative)item).updateRowItemsEnabledStates(); |
279 | 280 |
} |
280 | 281 |
updateAllowDelete(); |
Also available in: Unified diff
fix #7353 SpecimenTypedesignationsWorkingsetEditor: adapting to changes in DerivedUnitConverter and blockig kindOfUnit changes in case of multiple typeDesignations per specimen