Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Multifield in Coral UI 3

Avatar

Level 2

Hi,

 

We are migrating components from Coral 2 to Coral 3. In components having multifield the data is currently being stored in JSON format.  After coral 3 migration for multifield, we have added a composite={Boolean}true. After migration multifield is storing data in node structure. (e.g item0, item1). We have done changes in Model class to adapt it.

 

Question : Is there any way we can migrate the multifield and even after migration the data can be stored in JSON format. We have 30 odd components having Multifiled which will require changes in Model and Test classes. Just want to see if there is any other alternative.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

ACS Common to store multifield as json has been already deprectaed.

1. I would suggest writing a utility that read the JSON and convert into nodes for all the existing pages e.g. https://github.com/arunpatidar02/aem63app-repo/blob/master/java/MultifieldConvertCoral2to3Servlet.ja...

2. Update the Model with a common util class that converts multifield node to JSON so that the existing JSON logic can be reused.

 

Another approach would be writing dialog listeners to create JSON from multifield nodes and store them in hidden field on dialog submit and multi-field would be saved as JSON.



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

ACS Common to store multifield as json has been already deprectaed.

1. I would suggest writing a utility that read the JSON and convert into nodes for all the existing pages e.g. https://github.com/arunpatidar02/aem63app-repo/blob/master/java/MultifieldConvertCoral2to3Servlet.ja...

2. Update the Model with a common util class that converts multifield node to JSON so that the existing JSON logic can be reused.

 

Another approach would be writing dialog listeners to create JSON from multifield nodes and store them in hidden field on dialog submit and multi-field would be saved as JSON.



Arun Patidar