[MGNLUI-5852] Streamline default value configuration for selects Created: 05/May/20  Updated: 28/Apr/21  Resolved: 27/Oct/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2
Fix Version/s: 6.2.4

Type: Improvement Priority: Neutral
Reporter: Viet Nguyen Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 1
Labels: 622, defaultValue
Remaining Estimate: Not Specified
Time Spent: 11d 11m
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLDAM-903 CLONE - Streamline default value conf... Closed
is cloned by PAGES-366 CLONE - Streamline default value conf... Closed
Problem/Incident
causes MKTAUT-130 Populating the marketing component d... Closed
Relates
relates to MGNLUI-6119 defaultValue in M5 checkbox dialog de... Closed
relates to MGNLUI-5678 Property 'selected' not working on in... Closed
relates to MGNLUI-6267 Default/selected property not working... Closed
causality
dependency
depends upon MGNLUI-5974 Make content app instances a part of ... Closed
is depended upon by MGNLUI-6084 In "Add component" dialog: pre-select... Closed
supersession
supersedes MGNLUI-6218 defaultValue is not applied within a ... 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)
Testcase included:
Yes
Release notes required:
Yes
Date of First Response:
Epic Link: UI framework implementation
Sprint: CM & OC 8, CM & OC 9, CM & OC 10, CM & OC 11, UI FW 13, UI FW 14
Story Points: 5

 Description   

Currently select field missing a configuration point for pre selected item.

Bring it at par with M5. Check for the different implementations of the select field.



 Comments   
Comment by Christopher Chard [ 24/Jun/20 ]

Hello Viet,
how is the status on this issue?
Thanks, kind regards,
Chris

Comment by Viet Nguyen [ 24/Jun/20 ]

Hello cchard,

People are planning for this and other functions at the moment, we'll keep you updated with any news here.

Have a good day!

Comment by Christopher Chard [ 24/Jun/20 ]

Awesome, thx! (as I think it is a quite commonly needed feature consider this as a +1

Comment by Viet Nguyen [ 06/Aug/20 ]

Related ticket MGNLUI-6119 which happen to check box (this one is about selected options).

Comment by Aleksandr Pchelintcev [ 29/Oct/20 ]

For release notes:
The current ticket (and the related ones) fix default value configuration for the form fields. Some considerations:

  • default values need to be applied to the form explicitly. To facilitate that we have introduced the new API: EditorView#applyDefaults(). This API is the alternative to the EditorView#populate API in case of the new item creation. We handle the situation already in our own code (OpenDialogAction and ContentDetailSubApp), but custom logic might need adaptation.
  • default values currently need to be specified in preferably a model form (the form that ends up being stored in the backend) and the form view will use the configured converters to bring the default value to the presentation form (the one the user sees). This means that e.g. select fields backed by option list can specify option value (string) as a default value. In case of JCR-backed selects both UUID or path would work since default JCR Node converter that comes with JcrDatasource can handle both.
Generated at Mon Feb 12 09:30:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.