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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Dynamic options in selection is getting reset on page reload.

sureshy2015
Level 4
Level 4

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.

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

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. 

View solution in original post

4 Replies
cquser_cquser
Level 3
Level 3

can you post the code written on loadcontent event?

smacdonald2008
Correct answer by
Level 10
Level 10

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. 

View solution in original post