Project

General

Profile

feature request #8293

Distribution preferences for details view should be serverside preferences

Added by Katja Luther 3 months ago. Updated about 1 month ago.

Status:
Feedback
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
05/22/2019
Due date:
% Done:

0%

Severity:
normal
Tags:

Description

the preferences for distribution data (areas and status) used in details view should be serverside preferences

Associated revisions

Revision 182b1e60 (diff)
Added by Katja Luther 3 months ago

ref #8293: distribution details view uses the same status pref as distr. editor

Revision 63851d14 (diff)
Added by Katja Luther 3 months ago

ref #8293: update drop down when selection of area changed

Revision 91d58d15 (diff)
Added by Katja Luther 3 months ago

ref #8293: use distribution editor preference for area filter in details view

Revision 955fadf4 (diff)
Added by Andreas Müller about 1 month ago

ref #8293 try to fix IAE in Distribution Details View if status pref exists

Revision 0aebb4bc (diff)
Added by Andreas Müller about 1 month ago

ref #8293 try to fix IAE in Distribution Details View if status pref exists

History

#1 Updated by Andreas Müller 3 months ago

  • Tags set to euro+med

#2 Updated by Katja Luther 3 months ago

  • Status changed from New to Feedback
  • Assignee changed from Katja Luther to Andreas Müller

do we really want to have two different preferences? one for the distribution editor,one for the details view?

#3 Updated by Andreas Müller 3 months ago

  • Assignee changed from Andreas Müller to Katja Luther

I didn't say we want 2, but we want it serverside, currently this is not yet the case. It should be 1 predicate I guess with 2 different subjects if requested , but usually we will define generic subject such as / or /taxeditor/ which is valid for both. More specific subject could be /taxeditor/distributioneditor/ or /taxeditor/facts/ or what ever subject we want for data edited via facts/details view (needs to be discussed)

#4 Updated by Andreas Müller 3 months ago

But in a way you are right and the details view when used via distribution editor and the distribution editor itself should maybe even have the same subject.
Except if you want to allow a bit more in the details view then it could have a subject like /taxeditor/distributionEditor/detailsView/ . But for now this is not needed I think.

Anyway, at the moment the details view for the distribution editor still does not use the distribution editor preferences I think.

#5 Updated by Katja Luther 3 months ago

now the distribution status comes from the same preference and the input of the combo box is updated depending on the area selection.

#6 Updated by Katja Luther 3 months ago

  • Status changed from Feedback to In Progress

#7 Updated by Katja Luther 3 months ago

now, the vocabulary defined in the distribution editor preference is used for the area filter

#8 Updated by Andreas Müller about 1 month ago

When trying to edit a distribution in facts view I get an IAE:

login : admin
editor version : 5.8.0.201907180811
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.5.0.0.20190221
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: Invalid UUID string: )
    at org.eclipse.swt.SWT.error(SWT.java:4533)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.lang.IllegalArgumentException: Invalid UUID string: 
    at java.util.UUID.fromString(UUID.java:194)
    at eu.etaxonomy.taxeditor.ui.section.description.detail.DistributionDetailElement.getStatusListForArea(DistributionDetailElement.java:102)
    at eu.etaxonomy.taxeditor.ui.section.description.detail.DistributionDetailElement.createControls(DistributionDetailElement.java:72)
    at eu.etaxonomy.taxeditor.ui.section.description.detail.DistributionDetailElement.createControls(DistributionDetailElement.java:1)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.updateContent(AbstractCdmDetailElement.java:107)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.setEntity(AbstractCdmDetailElement.java:94)
    at eu.etaxonomy.taxeditor.ui.section.description.detail.AbstractDetailedDescriptionDetailElement.<init>(AbstractDetailedDescriptionDetailElement.java:51)
    at eu.etaxonomy.taxeditor.ui.section.description.detail.DistributionDetailElement.<init>(DistributionDetailElement.java:57)
    at eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.createDetailedDescriptionDetailElement(CdmFormFactory.java:3132)
    at eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailElement.createControls(DescriptionElementDetailElement.java:42)
    at eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailElement.createControls(DescriptionElementDetailElement.java:1)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.updateContent(AbstractCdmDetailElement.java:107)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.setEntity(AbstractCdmDetailElement.java:94)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection.setEntity(AbstractCdmDetailSection.java:135)
    at eu.etaxonomy.taxeditor.view.detail.CdmSectionPart.setFormInput(CdmSectionPart.java:160)
    at org.eclipse.ui.forms.ManagedForm.setInput(ManagedForm.java:210)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.refresh(AbstractCdmDataViewerE4.java:162)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.setInput(AbstractCdmDataViewerE4.java:143)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsViewerE4.setInput(DetailsViewerE4.java:196)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsViewerE4.setInput(DetailsViewerE4.java:163)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4.showViewer(AbstractCdmEditorPartE4.java:233)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4.selectionChanged_internal(DetailsPartE4.java:106)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4$DelaySelection.run(AbstractCdmEditorPartE4.java:90)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    ... 23 more

#9 Updated by Andreas Müller about 1 month ago

This error is a blocker!!

#10 Updated by Andreas Müller about 1 month ago

Andreas Müller wrote:

This error is a blocker!!

I tried to fix with 955fadf4. Will see if it works

#11 Updated by Andreas Müller about 1 month ago

The fix seems to work. Katja, can you please check, why empty strings are possible here. It is a bit strange. In the DB the strings look ok:
c9fc9fe0-91a6-4cf0-9f57-31a4b24c3b24;c3ee7048-15b7-4be1-b687-9ce9c1a669d6;310373bf-7df4-4d02-8cb3-bcc7448805fc;42946bd6-9c22-45ad-a910-7427e8f60bfd;b74dc30b-ee93-496d-8c00-4d00abae1ec7;2fda5393-7423-4076-814c-1fa7678d7d33
and
c9fc9fe0-91a6-4cf0-9f57-31a4b24c3b24;c3ee7048-15b7-4be1-b687-9ce9c1a669d6;ddeac4f2-d8fa-43b8-ad7e-ca13abdd32c7;e191e89a-a751-4b0c-b883-7f1de70915c9;42946bd6-9c22-45ad-a910-7427e8f60bfd;59709861-f7d9-41f9-bb21-92559cedd598

These should be split correctly without empty strings. But maybe the handling in the PrefCache is different.

#12 Updated by Andreas Müller about 1 month ago

The preference menu is not correct. You put it to UI-DistributionData-VocsAndStatus

UI is only for UI! (as the name says)

Preferences that are data specific should be handled there (e.g. here at Factual Data). Maybe we should put all data related preferences to a common main menu "Data" and then Submenu Factual Data, Taxa, Names, but that needs discussion.

However, the now implemented prefs belong to factual data and might be called distributions ("vocabularies" is anyway the wrong label, should be "areas"). In UI-Distribution Editor we may have a submenu "Areas and status". This could do the same as the above but with always setting "distributionEditor" as part of the subject so it is specific for the distribution editor. Additionally we should have a "use default" switch which allows to use the default values from "factual data" which will be chosen in most cases. We may create a new ticket for this last issue.

#13 Updated by Andreas Müller about 1 month ago

  • Status changed from In Progress to Feedback

#14 Updated by Andreas Müller about 1 month ago

Is there a reason why if used in distribution editor, the Status field and the modifying text field in details view is disabled? I understand that "Area" needs to be disabled, but the former fields could (and should) be editable I think.

#15 Updated by Andreas Müller about 1 month ago

Beside these issues the implementation works correctly as it looks like. This gives more consistency to data and UI.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)