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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

granite/ui/components/coral/foundation/form/hidden i snot getting stored in Multifield after Coral 3 migration

ks_hitijingole
Level 2
Level 2

Hi,

 

I am migrating an Accordion component. I have a multifield which has 2 fields

 

1. Question- cq/gui/components/authoring/dialog/richtext

2. id- granite/ui/components/coral/foundation/form/hidden

 

ks_hitijingole_0-1625823631385.png

 

 

Before migration in the component properties both the fields are stored in JSON.

 

ks_hitijingole_1-1625823783284.png

 

 

But after migration I see only question is getting stored in item nodes. 

ks_hitijingole_2-1625823828826.png

 

Any idea why only id is not getting stored after Coral 3 migration?

1 Accepted Solution
Bimmi_Soi
Correct answer by
Community Advisor
Community Advisor

Hi @ks_hitijingole ,

 

If your Id field is hidden in the dialog using granite/ui/components/coral/foundation/form/hidden resourceType, then how are you authoring the value of id.

 

I feel there should be a listener to increment the value of id on adding each multifield and that is not working on migration.

 

Can you please check how you were incrementing the value.

 

And as now multifield is fetched in the model as list you can either remove id from the dialog and can add the index too in the list of multifield

 

Hope this helps.

 

Thanks

View solution in original post

0 Replies
KirtiA
Level 2
Level 2

Hi @ks_hitijingole :
Could you please try giving "value" property as well to "granite/ui/components/coral/foundation/form/hidden" resource type.
without this property given value will not be saved in JCR.
check this documentation for more info :
https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui...

ks_hitijingole
Level 2
Level 2
@KirtiA After adding value id is getting stored in item nodes. But earlier the id used to increment on it's own whenever a multifield was added. Same isn't happening now. Any idea how can it be implemented in Coral 3.
KirtiA
Level 2
Level 2

Please check if you have any listener written on the dialog field to increment the id based upon the number of field in the multi-field, if yes same you would have to tweak accordingly to make it work with coral 3.
if not you can write a listner to increment the field value.

Bimmi_Soi
Correct answer by
Community Advisor
Community Advisor

Hi @ks_hitijingole ,

 

If your Id field is hidden in the dialog using granite/ui/components/coral/foundation/form/hidden resourceType, then how are you authoring the value of id.

 

I feel there should be a listener to increment the value of id on adding each multifield and that is not working on migration.

 

Can you please check how you were incrementing the value.

 

And as now multifield is fetched in the model as list you can either remove id from the dialog and can add the index too in the list of multifield

 

Hope this helps.

 

Thanks

View solution in original post

ks_hitijingole
Level 2
Level 2
@Bimmi_Soi, After migration I believe the listener was not able to increment the value of ID. So I wrote a custom logic to add id in the Sling Model itself and I was able to achieve the expected behavior.