[MGNLPN-361] Preview as visitor: field event is not getting current data when using composite fields in valueField Created: 30/Jan/17  Updated: 20/Feb/17  Resolved: 15/Feb/17

Status: Closed
Project: Magnolia Personalization
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File config.modules.personalization-traits.traits.mytrait.valueField.xml    
Issue Links:
Relates
supersession
is superseded by MGNLPN-304 Can't use linkfield for setting value... 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
Date of First Response:
Sprint: Kromeriz 83
Story Points: 3

 Description   

In preview as visitor, if there is a valueField made of a composite field, the current change are not taken into account, always the previous selection is gotten.

On PreviewParametersPresenter:

private Field.ValueChangeListener valueChangeListener = new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            eventBus.fireEvent(new PreviewChangedEvent(itemDataSource));
        }
    };	

itemDataSource has the previous value not the current one, so the preview is not updated properly.

Attached you can find an example of fieldvalue config.modules.personalization-traits.traits.mytrait.valueField.xml . With this configuration if you set a breakpoint in above code you are able to see that itemDataSource doesn´t have the correct information.

This issue seems to be similar to MGNLPN-304.

More information can be found in support ticket SUPPORT-7162.



 Comments   
Comment by Roman Kovařík [ 31/Jan/17 ]

Another possible solution could be adding the listener also for nested field of complex fields and add keyboard listener (MGNLPN-304) for text/link fields (or just one key listener for the whole view).

Comment by Roman Kovařík [ 16/Feb/17 ]

^ Implemented under MGNLPN-304

Generated at Mon Feb 12 06:36:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.