Hi Luke,
> Hi,
>
> I would like to display confirmation dialog before the user leaves currently
> opened page in tabview. The reason for confirmation dialog is that I would
> like to notify him, that there are not-saved changes, and they will be lost
> if he leaves. When using event changeSelection it is too late, as the it is
> fired after the selection was modified and I didn't find anything like
> beforechangeSelection.
>
> Is there any straight way to do what I need?
>   
I usually do this by preventing the user from clicking elsewhere, as 
soon as something gets changed which has to be saved. He has to press a 
"skip changes" button to leave the tabview.

If you don't or can't use this technique, then your original idea is 
good too. In that case, in the changeSelection listener, find the old 
target, check if anything is to be saved, in which case, set the 
selection to that old tab page again and show the dialog prompt to the 
user. It could appear jerky with 2 rapid change in views, but would 
render smooth in most cases.

cheers,
skar.

-- 
--
The life so short, the craft so long to learn. 


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to