Project

General

Profile

feature request #7680

Refactor TaxonNodeDetailElement

Added by Patrick Plitzner 5 months ago. Updated 3 months ago.

Status:
In Progress
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
08/24/2018
Due date:
% Done:

20%

Severity:
normal

Description

Copied from #7679:

While investigating this issue I realized that the NewTaxonNodeWizard does not work like all the other "new" wizards.

Usually the sequence is as follows:

1.In AbstractNewEntityWizard.createNewEntity() a new instance of the class is created.

    protected Reference createNewEntity() {
        return ReferenceFactory.newGeneric();
    }

2.The wizard page returns a detail element for the newly created entity via AbstractCdmEntityWizardPage.getDetailElement() This is the same element as used in the DetailsView.
3.The handleEvent() method listens to editing changes in the detail element and stores the parameters to the newly created entity

public void handleEvent(Object eventSource) {
        if (eventSource == combo_referenceType) {
            getEntity().setType(combo_referenceType.getSelection());

4.When closing the wizard AbstractNewEntityWizard.saveEntity() is invoked

    protected void saveEntity() {
        CdmStore.getService(IReferenceService.class).save(getEntity());
    }
  • The new taxon node wizard does not create a new entity but uses the current selection.
  • This is why all these exception are thrown when creating a root child because the entity used in the wizard is the classification and not the new taxon node as it should be.
  • Only during saveEntity() a new taxon instance is created (should be done createNewEntity()) and all the UI parameter fields are stored to the taxon (should be done in handleEvent())

Related issues

Copied from Edit - bug #7679: NPE when creating root child in classification Closed 08/23/2018

Associated revisions

Revision e04a2b79 (diff)
Added by Katja Luther 5 months ago

ref #7680: unplaced, excluded and publish checkboxes should be available in NewTaxonnodeWizard

Revision 9da648a0 (diff)
Added by Katja Luther 5 months ago

ref #7680: fix NPE for excluded notes

Revision 4443b90a (diff)
Added by Katja Luther 3 months ago

ref #7793: adapt taxonnode wizard and add menu item to set unplaced in navigator

Revision 83f2186a (diff)
Added by Katja Luther 3 months ago

ref #7793: adapt taxonnode wizard and add menu item to set excluded in navigator

Revision 05a6f11d (diff)
Added by Katja Luther 3 months ago

ref #7793: add preference for show taxonnode wizard

History

#1 Updated by Patrick Plitzner 5 months ago

  • Description updated (diff)

#2 Updated by Patrick Plitzner 5 months ago

  • Copied from bug #7679: NPE when creating root child in classification added

#3 Updated by Katja Luther 5 months ago

  • Priority changed from New to Highest
  • Target version changed from Unassigned CDM tickets to Release 5.3

#4 Updated by Katja Luther 5 months ago

  • Status changed from New to In Progress

the problems of not visible unplaced, excluded and publish checkboxes are fixed now. But to implement the NewTaxonNodeWizard the same way as the other NewWizards we need to add the possibility to create a taxonNode or to change the taxon of a taxonNode. Maybe we should discuss this before we implement these options.

#5 Updated by Katja Luther 5 months ago

  • Target version changed from Release 5.3 to Release 5.4

the functionality is available now, but as described in the comment above we would need the functionality to create a TaxonNode without a taxon to use the newWizard the same as the other newWizards. Therefore I move this ticket to next release.

#6 Updated by Andreas Müller 3 months ago

  • Target version changed from Release 5.4 to Release 5.5
  • % Done changed from 0 to 20

some work has been done within #7793, I added the commits to this ticket.

However, due to the described problem a complete refactoring of the taxon node wizard is not yet done so I move ticket to next milestone

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)