Revision ff20525a
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java | ||
---|---|---|
55 | 55 |
import eu.etaxonomy.cdm.vaadin.util.converter.TypeDesignationSetManager.TypeDesignationWorkingSetType; |
56 | 56 |
import eu.etaxonomy.cdm.vaadin.view.name.SpecimenTypeDesignationWorkingsetPopupEditor; |
57 | 57 |
import eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditor; |
58 |
import eu.etaxonomy.cdm.vaadin.view.name.TaxonNamePopupEditorMode; |
|
58 | 59 |
import eu.etaxonomy.cdm.vaadin.view.name.TypeDesignationWorkingsetEditorIdSet; |
59 | 60 |
import eu.etaxonomy.cdm.vaadin.view.reference.ReferencePopupEditor; |
60 | 61 |
import eu.etaxonomy.vaadin.mvp.AbstractPresenter; |
... | ... | |
228 | 229 |
|
229 | 230 |
TaxonNamePopupEditor popup = getNavigationManager().showInPopup(TaxonNamePopupEditor.class); |
230 | 231 |
popup.withDeleteButton(true); |
232 |
configureTaxonNameEditor(popup); |
|
231 | 233 |
popup.loadInEditor(event.getEntityId()); |
232 | 234 |
if(event.getSourceComponent() != null){ |
233 | 235 |
popup.setReadOnly(event.getSourceComponent().isReadOnly()); |
234 | 236 |
} |
235 |
// disable NomReferenceCombobox: |
|
236 |
// the in the registration application inReferences should only edited centrally |
|
237 |
// setEnabled must be set at last otherwise it will not be effective |
|
238 |
popup.getNomReferenceCombobox().setEnabled(false); |
|
237 |
|
|
239 | 238 |
} |
240 | 239 |
|
241 | 240 |
|
... | ... | |
249 | 248 |
TaxonNamePopupEditor popup = getNavigationManager().showInPopup(TaxonNamePopupEditor.class); |
250 | 249 |
popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE,CRUD.DELETE)); |
251 | 250 |
popup.withDeleteButton(true); |
251 |
configureTaxonNameEditor(popup); |
|
252 | 252 |
popup.loadInEditor(newTaxonNameForRegistration.getId()); |
253 | 253 |
// disable NomReferenceCombobox: |
254 | 254 |
// the in the registration application inReferences should only edited centrally |
... | ... | |
256 | 256 |
popup.getNomReferenceCombobox().setEnabled(false); |
257 | 257 |
} |
258 | 258 |
|
259 |
/** |
|
260 |
* TODO consider putting this into a Configurer Bean per UIScope. |
|
261 |
* In the configurator bean this methods popup papamerter should be of the type |
|
262 |
* AbstractPopupEditor |
|
263 |
* |
|
264 |
* @param popup |
|
265 |
*/ |
|
266 |
protected void configureTaxonNameEditor(TaxonNamePopupEditor popup) { |
|
267 |
popup.enableMode(TaxonNamePopupEditorMode.suppressReplacementAuthorshipData); |
|
268 |
|
|
269 |
} |
|
270 |
|
|
259 | 271 |
/** |
260 | 272 |
* Creates a new <code>Registration</code> for a new name that has just been edited |
261 | 273 |
* using the <code>TaxonNamePopupEditor</code>. The new name was previously created |
Also available in: Unified diff
fix #7170 hiding CombinationAuthorship & BasionymAuthorship if empty