Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: rm repo link (MGNLRESTUI-19)

...

Provider types

For JCR data sources

$type (class shortcut name)Class name and description
jcrChildNodeProvider

info.magnolia.ui.databinding.JcrChildNodeProviderDefinition

Resolves child JCR node from the parent.

jcrCurrentNodeProvider

info.magnolia.ui.databinding.JcrCurrentNodeProviderDefinition

Returns the parent node.

jcrNodeFromLocationProvider

info.magnolia.ui.databinding.JcrNodeFromLocationResolutionDefinition

Resolves node content from the current location.

The jcrCurrentNodeProvider and jcrChildNodeProvider are only suitable for sub forms since a dependency on a parent node is presupposed to exist.

...

Code Block
languageyml
linenumberstrue
  view:
    label: View Commit
    class: info.magnolia.ui.contentapp.detail.DetailDescriptor
    datasource:
      $type: jsonDatasource
      restClient: bitbucket
      restCall: commit
      jsonPathExpressions:
        properties:
          author: '$.author.raw'
    actions:
      cancel:
        label: Cancel
        $type: closeAction
    itemProvider:
      $type: jsonProvider

(A snippet of an existing full definition, see https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/browse/declarative-rest-demo/apps/commits.yaml#50-65.)

In a form definition

A provider strategy can be applied to handle data-read operations in forms with complex field. For example, see the jcrChildNodeProvider in the following definition of a complex field called address , composed of two simple fields, city and country .

...