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>
Solved! Go to Solution.
Views
Replies
Total Likes
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.
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.
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...
Views
Likes
Replies
Views
Likes
Replies