[MGNLRESTUI-8] multiField support for REST datasource Created: 10/Oct/19  Updated: 24/Jan/20  Resolved: 07/Jan/20

Status: Closed
Project: Magnolia REST Client UI
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Story Priority: Major
Reporter: Christopher Zimmermann Assignee: Quach Hao Thien
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 7d 5h
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLRESTCL-84 Cannot display content list in detail... Closed
causality
is causing MGNLRESTUI-12 DOC: REST entities support complex fi... 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)
Documentation update required:
Yes
Date of First Response:
Epic Link: Declarative REST clients
Sprint: Declarative REST 13, Declarative REST 14
Story Points: 2

 Description   

Timebox for research on OrderHandler: 2 SP

User Story:

As a developer, I want to integrate datasource which contain arrays and nested data structures that I want to show in detail subapps, so that I can work with most REST datasources.

There appears to be a limitation in the current rest datasource.

I was not able to display the content from this endpoint in a detail view.
http://transport.opendata.ch/v1/stationboard?station=basel

One of the things that appears to be missing to use a multiField is an appropiate orderHandler for json data.

For jcr there is:

orderHandler:
  $type: jcrChildNodeOrderHandler

But I could not supply an appropriate "orderHandler" as there is not one for the jsonDatasource.

Also for jcr there is:

itemProvider:
  $type: delegateToSubNodeProvider

 Not sure if there is something for json.

 

To reproduce:

Notes

See: https://git.magnolia-cms.com/users/czimmermann/repos/restclient-testing/browse/light-modules/rc-transportation-demo/apps/stations.yaml

In particular look at line #55 for the jsonPath.

Look at line #69 and after for the form configuration. Look for (MULTIFIELD)

More Notes

 Trying to do what is demod in M6UI in contacts app:

contactsV8 app. (Line 283) https://git.magnolia-cms.com/projects/MODULES/repos/contacts-app/browse/src/main/resources/contacts/apps/contacts-v8.yaml



 Comments   
Comment by Christopher Zimmermann [ 04/Nov/19 ]

Comments from Sasha on Slack: 

delegateToSubNodeProvider is a JCR thing…
so we’d need to provide a custom item provider indeed here (as a standard solution)
@jarda maybe you guys could consider adding comlex field support for the REST entities?

In response to above I changed it to 
 itemProvider:
     $type: jsonProvider
 

Comment by Quach Hao Thien [ 07/Jan/20 ]

For QA: Run Stations app, which defined in declarative-rest-demo light-module, for more information

Generated at Mon Feb 12 06:50:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.