How to force a dialog to front? - jdialog

I would like to display a modal JDialog OVER all standing dialogs
when it is invoked (say) by a function key.
This way I want to display a status of my application regardless
of the pile of dialogs and pop-up's already 'on the air'.
I tried to have the dialog in question 'owned' by the mainframe
and to (Frame)null without success.
The method 'this.toFront()' just before 'this.setVisible(true)'is also without effect.
What am I doing wrong?
Thanks for reading.
;JOOP!

It appears to be: [code]window.setAlwaysOnTop(true)[/code]
;JOOP!

Related

Cannot type into text input on jqModal dialog when modal set to true

Having upgraded jqModal from r13 to r22, I find that where my dialogs contain text inputs it is not possible to type into them. Removing modal:true from the settings fixes it, but I don't want my users to be able to dismiss the dialog by clicking on the overlay. Is this behaviour by design, or is it a bug?
This is certainly not by design. I have released a fix (+r23). Please open a github issue if you require further assistance.
Related:
If you're nesting modals, be sure to have a higher z-index value on child modals.
You may override the $.jqm.focusFunc() to provide custom behaviour for events occurring outside the currently active modal.

Prevent window from being captured

I'm solving this problem so long an i can't find solution.
I would like to capture a screen but i want to exclude a specific window.
Like capture whole screen but remove an window from it.
Or what i have to set to notepad like styles or something to being captured ?
Thanks
Regarding screen capture, you could hide window/capture/show window using windows api calls. Second question I did not understand.

Can I detect if a (node-webkit) window is visible?

I would like the user to be able to click on the system tray icon to hide a window if it is visible, or show it if it isn't. However I can't see way to detect the show/hide state of the window.
I looked here but couldn't see anything that would give me what I need. The only way seems to be to keep track of if my last call was to show() or to hide(). Is there a better way?
I've needed this myself just recently, but as far as I know the best (only?) way is to set a boolean (e.g. var showing = true;) and then on every change (including the minimize and restore events) set the boolean to the correct value. Then you could simply make an if statement when clicking on the tray icon to see if the window is showing, and if it is hide the window, otherwise show it.
Hope I helped you a bit, I'm still looking for a better way myself but this is all I have found so far.

How to fix a non responding ext.list?

I've got a problem with an Ext.List:
You press a button on the main menu and are shown the list. Everything on it works fine and it let's you choose, where to go deeper inside the app. No problems so far.
But if you then go back to the main menu by pressing a "back"-button and reenter the page, that shows this Ext.List, it doesn't work anymore: you can't select an entry of the list.
The "back"-button removes the list, if you return to the main menu this way:
setTimeout(function(){page.removeAll();},100);
What's my mistake? Do you know a better method than "page.removeAll()" that really kills this Ext.List to let it then be completely recreated when I choose to see it in my main menu?
Thanks in advance, you guys have the best tips and tricks.
It's hard to tell without seeing your code but I suspect that there is a javascript error somewhere in the program flow that you described. If you display the javascript console in either Chrome or Firefox it should show the error.
Depending upon how the function that creates the list is defined it would normally recreate the list upon page/function entry and there should be no need to 'kill' the list explicitly.

Display message box while closing the window by using closing option (X) of the window

Can anyone help me how to display message/alert box when user clicks Close option (X) of the window in flex ?
Like in html we can handle it by using,
window.onbeforeunload = function(){return "Are you sure you want to Exit";}
Is there anything in Flex similar to "window.onbeforeunload" of HTML which can handle Close option (X) of the window ?
If not, can anyone help me to handle this with sample code.?
In my mxml i have not used any kind of , etc.
My flex screen is opened from a jsp page through a hyper link and i dont want to use any window related tags. It is normal screen with min, max and close option.
Thanks,
Anand.
Use ExternalInterface.addCallback and from JavaScript call the AS function you want to run on close.
However I do not think you can block the browser from closing this way as it would be a security hole.
Another thing to note here is that the code in the function should run fast or you may risk not having it all done before the browser closes.
All clients work should be done before close so a method like this wouldn't be needed.
A more appropriate method would be to create some kind of session for the user and store the data server side as the client works.
Unless of course your are just trying to make some kind of hack app.