Page History
...
Item Provider Strategy is a much simpler solution than the 5 UI field transformers. An item provider only needs to know how to access the data. In contrast, the transformers in the 5 UI framework were responsible for both types of data operations – reading and writing. In addition to this:
- The number of item providers is much lower in Magnolia 6 UI, compared to a relatively high number of field transformers in the 5 UI.
- The provider implementations can handle also JSON structures, task and notifications items, assets or a specific product content items.
...
jcrNodeFromLocationProvider
- Resolves node content from the current location.jcrGetCurrentNode
- Returns the parent node.jcrGetChildNode
- Resolves child JCR node from the parent. It is suitable for the sub forms only, since it relies on the parent.jsonProvider
- Usable mainly in REST -related contexts, for example in client definitions of the REST Client module, it replacesjsonProvider
- Replaces the{id}
path path parameter with the one passed in the location and then fetches the result using a configured REST call.
The jcrGetCurrentNode
and jcrGetChildNode
providers are suitable for sub forms only since a dependency on a parent node is presupposed to exist.
In a sub app definition
In a sub app definition, a strategy is implemented for example in the Pages app, where the jcrNodeFromLocationProvider
is used (see line 7 below). This provider type resolves a JCR node from location context:
...