Skip to content

ValueChangedEvent not fired for ImageEncode-Event from Browser #498

Description

@tobiaskahl

Describe the bug
The ValueChangedEvent will not be fired, if private properties are updates.

Error
The if-statement of the following method is always false:
` // Used to sync the private variables (called after the frontend event has been
// fired)
private void updateImage(ImageEncode event) {
this.imageUri = event.getImage();
this.type = event.getType();
this.isEmpty = event.isEmpty();

if (!this.imageUri.equals(event.getImage())) {
  this.fireEvent(
      new ValueChangedEvent(
          event.getSource(), true, event.getImage(), event.getType(), event.isEmpty()));
}

}`
this.imageUri is set to the event-value in first line and compared afterwards.
The two values are always the same at this time.
Thie oldImageUri-Value has to be saved as local variable and then used in the if statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions