Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Multifield in Coral UI 3

ks_hitijingole
Level 2
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
Arun_Patidar
Correct answer by
Community Advisor
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.

View solution in original post

1 Reply
Arun_Patidar
Correct answer by
Community Advisor
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.

View solution in original post