Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14431

The uiScope.document.field.getValue(fieldPath) API doesn't seem to work to read other field value in draft mode

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Cannot Reproduce
    • 14.4.0
    • None
    • None
    • 3
    • Quasar
    • Puma Sprint 254, Puma Sprint 257

    Description

      As of CMS-12058, the api is supported to allow an OpenUI extension to read other field value through uiScope.document.field.getValue(fieldPath).

      But the API returns the field value only after it has once been persisted in the preview variant.

      If a user creates and edits a new document and the user enters a value to "the other" field for the first time, the API does not return the value that the user has just entered.

      I investigated it a little bit further by comparing the editing (draft mode) document editor view and the real draft variant node through cms console:

      [Document editor while editing]

      You can see the data that the user just selected in the product field. By the way, this product field is actually another OpenUI field, as well as the second "Product Variant" OpenUI field.

      [In the draft variant node through CMS Console]

      However, the draft variant node has neither "connectorid" dropdown selection value nor productid field value.

      As a result, the API doesn't seem to return the other field's value (from user's logical perspective, not from jcr perspective).

      This could be a problem in persisting the draft variant node while editing or in OpenUI field persisting in draft mode. Not sure... hope someone to investigate and provide a solution.

      Attachments

        1. doceditview.png
          doceditview.png
          69 kB
        2. draftnode.png
          draftnode.png
          151 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: