Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How do Dialogs save data to and read data from the JCR

Avatar

Level 6

I have often wondered, how does the dialog save / read data from the JCR, does it use ajax??

Regards

Clive Stewart

1 Accepted Solution

Avatar

Correct answer by
Level 10

Dialogs are basically forms.

When you submit a dialog, data in all the fields will be sent a post request to aem default servlet and from there it will be stored in nodes. This is very similar to the way a web form works, values in all the fields will be sent to the path specified in actions. Now here in place of action, you have the path to current node where data will be saved.

When you open dialog, get request will be made to the current node all properties are fetched and shown on dialog.

You can see those request when you look into browser network tabs

Thanks

View solution in original post

3 Replies

Avatar

Level 9

Hi,

Not pretty sure, but just a thought.

In one of the posts in the forum it was mentioned that Sightly in turn is converted to java format. So, probably once this conversion happens, data is read/written to the jcr.

Even I am curious to get some further details/insights into its working. May be some of the members can provide their inputs here.

Avatar

Correct answer by
Level 10

Dialogs are basically forms.

When you submit a dialog, data in all the fields will be sent a post request to aem default servlet and from there it will be stored in nodes. This is very similar to the way a web form works, values in all the fields will be sent to the path specified in actions. Now here in place of action, you have the path to current node where data will be saved.

When you open dialog, get request will be made to the current node all properties are fetched and shown on dialog.

You can see those request when you look into browser network tabs

Thanks

Avatar

Level 9

Hi Praveen,

Thanks a lot for your inputs here.

In System console there is an entry "Apache Sling GET Servlet". Is that the default AEM servlet you are referring to?