Multifield value storage issue in AEM 6.4

Avatar

Avatar

tabassump428879

Avatar

tabassump428879

tabassump428879

11-08-2018

Hi,

We are working on AEM 6.4. We have multifield, nested multifiled component and we want to store all multifield values in JSON format.

Example:

{"description":"40k+","title":"PARTICIPANTS"}{"description":"60k+","title":"PARTICIPANTS"}

We tried with coral multifield but this saves values as nodes, which we are not looking for.

we tried using granite multifield, with acs-commons-nested property, but this also doesn't save values as JSON in 6.4. Its storing values as separate properties. Tried the below example:

Creating a Granite/Coral 6.3 Multifield HTL component for Adobe Experience Manager

Can you please suggest some solution for this.

Regards,

Tabassum

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Ravi_Pampana

MVP

Avatar

Ravi_Pampana

MVP

Ravi_Pampana
MVP

11-08-2018

Hi,

I had similar issue in AEM 6.4 where Composite multifield is storing as JSON array in AEM 6.2 but not storing correctly in AEM 6.4, I added property with value as "JSON_STORE" as below and it solved the issue, now values are storing as JSON array in AEM 6.4

<field

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/foundation/form/fieldset"

acs-commons-nested="JSON_STORE"

name="./myUserSubmenu">

Answers (9)

Answers (9)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

11-08-2018

Hi,

In AEM 6.3 and AEM 6.4 multifield values store in nodes not as JSON.

You can easily parse those nodes and use inside page without converting in JSON.

If you have specific requirement to serve JSON then need to write extra code to convert node into JSON just before serving.

Thanks
Arun

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

11-08-2018

Hi,

I glad it works for you but things to note down it will only work with ACS Common and Coral2 components(Legacy CoralUI 2 Components — Granite UI 1.0 documentation ). And not going to work with Granite Components(Coarl3) Granite UI Foundation Server-side — Granite UI 1.0 documentation .

Thanks

Arun

Avatar

Avatar

user185354881

Avatar

user185354881

user185354881

15-10-2019

I have an issue that in mutifield container, i add a colorfield in it, in edit dialog, set a value to the colorfield, save.

Then i open the edit dialog again, the colorfield value is shown, but when i save again, the value disappeared.

the colorfield works fine when not in multifield container.

It confuses me, anyone has suggestions? my email is niutianbo@hotmail.com

thanks, Jeffrey.

Avatar

Avatar

kiranrayapudi

Avatar

kiranrayapudi

kiranrayapudi

11-10-2019

Hi, we are having problem with multicomposite field with RTE inside it. we need two tabs in the dialog. second tab need to have the multicomposite field with rte inside it. right now we have done some changes but it is storing the values in node structure. can anyone give a full example dialog for my above requirement. thanks in advance.

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

22-08-2018

Hi ashishr1501,

As a best practice, you should be using Granite/Coral3 components from AEM 6.3 onwards. For this case either you can write some utility to read JSON from node property and create nodes structure for coral3 multifield or switch back to coral2 multifield component.

Avatar

Avatar

ashishr1501

Avatar

ashishr1501

ashishr1501

22-08-2018

Hi Arun,

I am also having similar kind of issue, we had multifield component n AEM 6.1 environment and all the fields have some data filled in the component's dialogs. But when i migrated to AEM 6.3 and changed the properties specific to coral3/granite types, the data is not there in the dialogs. I also have this property "JSON_STORE" but still it is not showing any data in the dialogs, which had earlier in AEM 6.1. Is it the point you are referring here that we need to change it in coral2 ?

Avatar

Avatar

tabassump428879

Avatar

tabassump428879

tabassump428879

12-08-2018

Hi Arun,

Yes you are right. Will surely keep this in mind while implementing the changes.

Thanks for the information.

Avatar

Avatar

tabassump428879

Avatar

tabassump428879

tabassump428879

11-08-2018

ravip15579397​ . This works!! Thank you

Avatar

Avatar

tabassump428879

Avatar

tabassump428879

tabassump428879

11-08-2018

Thanks Arun. That would be the last solution if nothing works.