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

Capture Dialog Button Press in JSP

Avatar

Level 2

Is it possible to capture when a dialog's ok button is pressed in JSP code?

For example: Let's say I have a component with a parsys and I drag in a component with multiple fields in its dialog.
The author fills out the dialog form and pressed the OK button. I take action on the values they entered and now want to clear their entry so when my code checks for that value again it won't take the action a second time. Can I know when they finish editing that new component using its dialog and clear the fields?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Write script in a JS file to read the values that are in the dialog fields. The script is fired when the button is clicked on the dialog. You can do what ever you want. Update other fields, read the values, and clear the fields,etc,  See this article on dynamically updating a dialog fields to give you an idea:

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Write script in a JS file to read the values that are in the dialog fields. The script is fired when the button is clicked on the dialog. You can do what ever you want. Update other fields, read the values, and clear the fields,etc,  See this article on dynamically updating a dialog fields to give you an idea:

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