Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
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

Level 10

can you explain requirement with screen shots?

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