[MGNLUI-3920] Remove changedProperties from adapters upon #removeItemProperty Created: 20/Jun/16  Updated: 29/Jul/16  Resolved: 28/Jul/16

Status: Closed
Project: Magnolia UI
Component/s: vaadin integration
Affects Version/s: None
Fix Version/s: 5.4.8

Type: Bug Priority: Neutral
Reporter: Mikaël Geljić Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: adapters, vaadin
Remaining Estimate: 0d
Time Spent: 1h
Original Estimate: 1h

Issue Links:
dependency
is depended upon by MGNLUI-3838 Wrong ACL-validation results in Acces... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Sprint: Saigon 54
Story Points: 3

 Description   

Currently, if we #addItemProperty and then #removeItemProperty on the adapter, before saving, it will still try to save the changed property (it's not removed from the map).

If we blindly do this, we then run into concurrent access, because #updateProperty (internal API) also calls #removeItemProperty (public Vaadin API) when value is blank. Then it's too late to act upon #changedProperties so we need to mark properties for deletion "internally" as well.

Use case/story:
Only the Item is passed from the FieldFactory to the Form to the SaveDialogAction.
So this simply allows us to carry arbitrary transient properties (with arbitrary type) along with the adapter, without the intention to save them to JCR (by the time we replace that with some form execution context in 5.5).


Generated at Mon Feb 12 09:11:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.