Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add JSON providers (MGNLRESTCL-121)

...

  • Item provider definition in a detail subapp
  • Item provider definition In a form containing composite and complex fields. In this use, the provider replaces the former field transformer functionality that is part of the UI framework 5, but no longer part of the Magnolia 6 UI.

Provider types

...

For JCR data sources

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

info.magnolia.ui.databinding.

JcrNodeFromLocationResolutionDefinition

JcrChildNodeProviderDefinition

Resolves child JCR node

content

from the

current location

parent.

jcrCurrentNodeProvider

info.magnolia.ui.databinding.JcrCurrentNodeProviderDefinition

Returns the parent node.

jcrChildNodeProvider
jcrNodeFromLocationProvider

info.magnolia.ui.databinding.

JcrChildNodeProviderDefinition

JcrNodeFromLocationResolutionDefinition

Resolves

child JCR

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.

For JSON data sources

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

info.magnolia.rest.ui.JsonItemProviderStrategyDefinition

Usable mainly in REST-related contexts, for example in client definitions of the REST Client module. It replaces Replaces the {id} path parameter with the one passed in the location and then fetches the result using a configured REST call.

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

...

jsonChildNodeProvider

info.magnolia.rest.ui.JsonChildNodeProviderDefinition

Resolves a child JSON node from the parent. Suitable for sub forms only since it relies on a parent.

JsonFieldPropertyProvider

info.magnolia.rest.ui.field.JsonFieldPropertyProviderDefinition

Proposes a JSON node property as an item data source. Typically, such a strategy would be used in complex fields with sub editors, where a single field entry needs to be exposed as an editor.

jsonMultiFieldProvider

info.magnolia.rest.ui.field.JsonMultiFieldProviderDefinition

Resolves a child JSON node from the parent in a multi field context. Suitable for sub forms only since it relies on a parent.

jsonMultiFieldPropertyProvider

info.magnolia.rest.ui.field.JsonMultiFieldPropertyProviderDefinition

Proposes a JSON node property as an item data source in a multi field context. Typically, such a strategy would be used in complex fields with sub editors, where a single field entry needs to be exposed as an editor.

In a sub app definition

The jcrNodeFromLocationProvider is used for example in the Pages app (see line 7 below). This provider resolves a JCR node from its location context:

...