Capture Dialog Button Press in JSP | Community
Skip to main content
bob_smith1
New Participant
October 16, 2015
Solved

Capture Dialog Button Press in JSP

  • October 16, 2015
  • 2 replies
  • 850 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

2 replies

Sham_HC
New Participant
October 16, 2015

can you explain requirement with screen shots?

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

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