Skip to main content
sureshy2015
Level 4
Oct 16, 2015 2:27 AM UTC
Solved

Dynamic options in selection is getting reset on page reload.

Hi,

I have selection field with dynamic options from servlet.

I am loading options from loadcontent event of the widget

the problem is when i select an option and submit dialog(clicking ok in dialog)  the value is getting stored in JCR but  when  i reload the page and open dialog it is not getting populated with the value.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

YOu can add app logic to the loadcontent event to display the value that you want in the selection control. See the events section here:

http://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.Selection

Otherwise - the control will display the data in order it was configured in the AEM Dialog. 

4 replies

sureshy2015
Level 4
Oct 16, 2015 2:27 AM UTC

it did not help

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

YOu can add app logic to the loadcontent event to display the value that you want in the selection control. See the events section here:

http://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.Selection

Otherwise - the control will display the data in order it was configured in the AEM Dialog. 

Translate
WhoaShekhar
Level 10
Oct 16, 2015 2:27 AM UTC

Hi There,

Thanks for reaching out to Adobe Community.

Please see if the below docs has something that helps:

https://helpx.adobe.com/experience-manager/using/creating-custom-cq-grid.html

https://helpx.adobe.com/experience-manager/using/dialog_fields_servlets.html

Thanks!

Translate
cquser_cquser
Level 2
Oct 16, 2015 2:27 AM UTC

can you post the code written on loadcontent event?

Translate