how to use Coral UI/multified and data like this? | Community
Skip to main content
jayv25585659
Level 8
July 5, 2023
Solved

how to use Coral UI/multified and data like this?

  • July 5, 2023
  • 2 replies
  • 1099 views

so I have the following CQdialog and it gives me something like in the screenshot (see below).

 

Any ideas on how to convert the multified to Coral UI and still get the same data format? Thanks!



<links jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/multifield" fieldLabel="Links Configurations"> <field jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/fieldset" acs-commons-nested="" name="./links"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" method="absolute" /> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <link jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser" fieldDescription="Select Image Path" fieldLabel="Path" name="./link" rootPath="/content" /> <link-text jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield" fieldDescription="Enter the link text to display. " fieldLabel="Tile Link Text" name="./linkText" /> <targetSelect jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/select" emptyOption="{Boolean}false" emptyText="Select yes or no" fieldLabel="Open in New Window" multiple="{Boolean}false" name="./target" > <items jcr:primaryType="nt:unstructured"> <self jcr:primaryType="nt:unstructured" selected="{Boolean}true" text="no" value="_self" /> <blank jcr:primaryType="nt:unstructured" text="yes" value="_blank" /> </items> </targetSelect> </items> </column> </items> </field> <typehint jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/hidden" name="./links@TypeHint" value="String[]" /> </links>

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ksh_ingole7

Hi @jayv25585659 

 

In Coral UI 3 the multifield data will de stored individual nodes. It would no more be stored in the above format. I would suggest to write a groovy script to covert existing data into individual data nodes. Please refer the below document.

 

https://aemhints.com/2020/10/24/coral-multifield-aem65/

2 replies

ksh_ingole7
Community Advisor
ksh_ingole7Community AdvisorAccepted solution
Community Advisor
July 5, 2023

Hi @jayv25585659 

 

In Coral UI 3 the multifield data will de stored individual nodes. It would no more be stored in the above format. I would suggest to write a groovy script to covert existing data into individual data nodes. Please refer the below document.

 

https://aemhints.com/2020/10/24/coral-multifield-aem65/

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 5, 2023

The JSON format was an old and now deprecated implementation, it is recommended to use the Multifield from coral3 which will store the data as nodes, if you really want to stick to the JSON implementation for some reason you will have to write your own, implementation, here are good resources of how to do it:

- https://medium.com/@ramamity94/implement-an-n-level-aem-multifield-using-coral-ui-and-sling-models-and-expose-as-json-4355f716e719

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/multifield-not-storing-values-as-json-data-on-aem-6-5/td-p/447880 

 

Esteban Bustamante