Project

General

Profile

task #7587

ToOneRelatedEntityReloader to listen and operate on PropertyDatasources directly?

Added by Andreas Kohlbecker 6 months ago. Updated 3 months ago.

Status:
New
Priority:
Priority14
Category:
cdm-vaadin
Target version:
Start date:
07/26/2018
Due date:
% Done:

0%

Severity:
normal
Tags:

Description

This idea came up while working on #7586.

Currently the ToOneRelatedEntityReloader is attached as ValueChangeListener to fields and changes the value of the field.
This value is then passed to the datasource contained in the fiels. The AbstractField.setValue() does a quality check do prevent from useless operations in cases the value does not really change. This fails however with cdm entities since the quality of cdm entities is a domain entity euqality not a java object equality. Therefore the equality check in com.vaadin.ui.AbstractField.setValue() is being tricked out by the following code:

toOneRelatedEntityField.setValue(null); // reset to trick equals check in vaadin
toOneRelatedEntityField.setValue(cachedEntity);

Instead ToOneRelatedEntityReloader could operate on the datasource directly, so the calling setvalue() twice would no longer be needed.


Related issues

Related to Edit - bug #7586: com.vaadin.data.Property$ReadOnlyException on opening TypeSpecimenWorkingsetEditor Closed 07/26/2018

History

#1 Updated by Andreas Kohlbecker 6 months ago

  • Related to bug #7586: com.vaadin.data.Property$ReadOnlyException on opening TypeSpecimenWorkingsetEditor added

#2 Updated by Andreas Kohlbecker 5 months ago

  • Target version changed from Release 5.3 to Release 5.4

#3 Updated by Andreas Kohlbecker 3 months ago

  • Target version changed from Release 5.4 to Release 5.5

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)