I am looking for a possibility to hook me into the closing of a window when a user clicks on the "X" in the window. For example, to ask the user whether he wants to save his data. And if possible it would be extremely nice to give a veto to prevent the closing. asked 03.01.2012 at 10:25 Nikel Weis |
For the first question, when a rich dialog is closed then the event "UNLOAD" will be called. Just catch this event in the Rich dialog logic and you can add your additional behavior. Unfortunately you cannot prevent the closing with this. answered 04.01.2012 at 07:47 Flavio Sadeghi ♦♦ |
I have another solution. In the start method of the Rich Dialog we add a script step. In there we remove the DefaultCloseOperation of the panel which defines what happens after a click on "X". Instead of the normal DefaultCloseOperation we register our own WindowListener. As the listener must be written in Java we use You can achieve it like this:
3. Add a close method to the RD Logic where you can execute custom code answered 29.03.2012 at 05:54 Flavio Sadeghi ♦♦ Peter Stöckli ♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 03.01.2012 at 10:25
Seen: 2,632 times
Last updated: 18.09.2014 at 13:51