Expand my Community achievements bar.

SOLVED

Date-picker not retaining values in multi-field in AEM 6.4

Avatar

Level 3

I am using date-picker within a multi-field but when i am saving value in this date-picker and opening the dialog again, I am not able to retain the date-picker value. I have tried this in AEM 6.4

If anyone has faced similar issue, Please let me know what is required to make it work.

Regards,

Priya

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
15 Replies

Avatar

Community Advisor

Hi,

Are you using Coral3 components(below)? If yes can you please post your dialog xml here?

/libs/granite/ui/components/coral/foundation/form/datepicker



Arun Patidar

Avatar

Level 3

Yes I am using coral 3 components. Please find below the dialog xml.

dialog.PNG

Avatar

Community Advisor

Hi,

I tried date picker with Multifield worked for me.

Can you add composite=true(Boolean) in mutiflield node and then check.

Screen Shot 2018-06-21 at 3.15.26 PM.png

Thanks

Arun



Arun Patidar

Avatar

Level 10

See this video i put together for you - it works:

Here is the article which is referenced in the video -- Building Experience Manager Components using Granite/Coral Resource Types

Avatar

Level 3

Hi Arun,

I tried adding composite=true property but that also didn't work for me. Could you please share the dialog xml that you have created for this? Need to check if i'm missing something here.

Regards,

Priya

Avatar

Correct answer by
Community Advisor

Avatar

Level 3

Hi Arun,

Thanks. It worked for me. The problem was with resource type of fieldset that i was using. I was using "granite/ui/components/foundation/form/fieldset" which was not working for Richtext and datepicker.

Avatar

Level 3

Arun, do you have any idea how to make rte and datepicker work with multi-field using acs-commons? Because it's only working for me if i don't use acs-commons, and use composite=true instead.

Avatar

Community Advisor

Hi Priya,

I've no idea about acs-commons multifield, I always use Coral3/Granite multiplied component.

And According to ACS commons, you should use Granite components. I am not sure if you are same or any other acs commons Multifield feature.

Multifield Extension

Screen Shot 2018-06-22 at 12.13.36 PM.png



Arun Patidar

Avatar

Level 3

But when are using coral multi-field, it's storing the multi-field data in Node structure. Is there any way of getting the data in JSON structure?

Avatar

Community Advisor

No, granite Multifield store data in nodes, For JSON store you need to use ACS Common Creating an AEM HTML Template Language 6.3 component that uses a Multifield

But you can read values from Node as well.Or If you need only JSON date you can you Java to read nodes and convert nodes date as a JSON and Store in component nodes.

Thanks
Arun



Arun Patidar

Avatar

Level 10

Did you watch the video and read the article. It covers everything you need to make this work. We show it working in the video!

Avatar

Level 10

IN AEM 6.4 - no longer use acs-commons multifield, Use granite/coral MF.

This is how granite/coral works - it stores it as NODE data as explained in the article. It does not use JSON.

Avatar

Level 10

Hi,

I suggest from AEM 6.4 - Please do not use ACS-COMMONS anymore. Please use coral/granite which is explained in the video from Scott.

Thanks,

Ratna Kumar.

Avatar

Level 3

Hi,

Yes i checked the video, actually i was trying to use the multi-field with acs-commons because I wanted to store the data in JSON form. But now it's working fine when I am using coral and it's storing the data in node structure.

Thanks,

Priya