[MGNLUI-3570] Investigation for MGNLUI-2397 (defaultValues) Created: 10/Sep/15  Updated: 15/Apr/16  Resolved: 06/Oct/15

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

Type: Bug Priority: Neutral
Reporter: Mikaël Geljić Assignee: Espen Jervidalo
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by PAGES-40 Default values do not work when editi... 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: Basel 14
Story Points: 8

 Description   

Evaluate technical options and decide on one.

Current caveat: We merely expect form items to be JcrNewNodeAdapter to apply default values.

  • doesn't work for nodes created "upfront" (e.g. page or optional area nodes, as opposed to component nodes)
  • doesn't apply very well to non-JCR content:
    • see the dirty logic in info.magnolia.ui.form.field.factory.AbstractFieldFactory#setPropertyDataSourceAndDefaultValue
    • see info.magnolia.ui.vaadin.integration.ItemAdapter#isNew

Possible options:

  1. Use some metadata to denote an "autogenerated" node, that has not been edited yet
  2. Compare createdDate and lastModifiedDate (careful about shortcomings)
  3. Denote at UI-framework/API level when a form/dialog should be presented as 'new'
    • as opposed to the first two options, it would not apply only to JCR


 Comments   
Comment by Espen Jervidalo [ 06/Oct/15 ]

We will try to fix this locally to pages app and introduce an own ContentConnector for the pages app which can handle autogenerated content. How we implement ItemAdapter#isNew is still open. We might to some hacky trick here, or pass it with the rendering from client side. We will probably have to consistently use ContentConnector in the PagesEditor-SubApp and related classes, but that is anyway considered technical debt IMO.

Comment by Espen Jervidalo [ 14/Oct/15 ]

See the linked ticket for an update status.

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