Hi Skar,

thanks for help. I also thought about the possibility to change the view
back to the unsaved one, but I have a quite big pages in tabview and this
solution would create undesired delay (at least at some points). Your
solution with the "skip changes" button sounds interesting... But I don't
know how to disable click on everything except from the button. Could you
show some snippet of code?

Just to explain more, my tabview is inside window, and I need to catch also
window.close() events. And if there are unsaved data provide the same
confirmation dialog. Also there is a navigation to select different
tabviews, and there should be also same confirm dialog.

As I know about beforeClose for window, and I have full control over the
navigation, I would still prefer to find out a way to prevent the selected
tab from opening (when data are not saved). Or even better, some qooxdoo
concept that handles those problems. Does exist some special type of
listener that prevents all default behavior and serves custom function if
some condition is true? I don't know really how to ask, or what to search,
so sorry for the weird definitions ...:)

Cheers, Luke


skar karthikeyan wrote:
> 
> Hi Luke,
> 
> 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. 
> 
> 
-- 
View this message in context: 
http://old.nabble.com/How-to-prevent-changing-Page-in-tabview-tp27017987p27019441.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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