Disabling windows close button in dialog

Hi,
I am using Jdev 10.1.3.x(10g)
I am opening a dialog pop up for a functionality. What i want is to force user to use cancel button provided inside dialog to come out of it and want user to not to use windows cance X button.
Is there any way by which i can hide the title bar or disable the close button or on click of widow close i actually click on cancel button throgh java script?
Main concern is i am passing some data from parent to dialog throgh process scope and i want to clear it on cancel. In my application there are many popup dialog which may lead to memeory issue so i seek solution to clear this data once it is not desired any more.
Also i tried Request object to pass the data but in popup it is not recognised.
Suggestion in any direction will be helpful.
Regards,
Kevin Chheda

Hi,
answering this question for 10.1.3 since 11g is different and provides a af:dialog component to handle this case. In 10.1.3 the window you open is an external browser window. You cannot disable the close button here because it is part of the browser window that JavaScript cannot control
Frank

Similar Messages

  • Disable/enable window close button?

    I have a new Window() open and I want to disable the close button when the window has already been opened. Does anyone know how to do this in Flex?

    Ok I got, it's an AIR app.
    You can listen to event Closing and preventDefault on it. Check this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           closing="closingHandler(event)">
    <fx:Script>
                <![CDATA[
                    protected function closingHandler(event:Event):void
                        if(!forceClose.selected)
                                event.preventDefault();
                ]]>
    </fx:Script>
    <s:CheckBox id="forceClose" label="Force close" />
    </s:WindowedApplication>
    Regards,
    Pablo Souza

  • How to disable the close button(Cross) on a dialog

    Hi,
    Is there a way to disable the close button (cross on the right top of the dialog) on a dialog.
    Thank you

    Since your posting in the swing project forum, I assume your talking about JDialog. If so, use JDialog.setDefaultCloseOperation( DO_NOTHING_ON_CLOSE ). Same method exists in JFrame as well, but not in JWindow.

  • How to mark window close button as "unsaved"?

    Using SWT, you can change the main window quit/close icon/button (in upper left corner of title bar) to indicate that the file/whatever of the application has not been saved. The code to do that in SWT is something like this -
    Shell shell = new Shell(new Display(), SWT.CLOSE | SWT.TITLE | SWT.BORDER | SWT.MIN);
    shell.setModified(true);
    Is this feature available in Java FX 2.2? If not, has there been a bug/request filed for it?

    I had a question going in the same direction: "Is there any way to disable the close button in a decorated stage?" but from your answer to the previous question, I guess this is not possible... could you please confirm this? A workaround would be to set an event handler to consume the window close event. Looks like I'll need to go that way. Or could you suggest a better way?I don't think it's possible with to disable the button in JavaFX 2.2 - if you did, it would provide an inconsistent native windowing experience for the user anyway as I've never seen a close button on a Windows 7 app disabled.
    However, as you point out, you can capture (and handle or ignore) the events if generated. You can do this by setting an onCloseRequest event handler for the window and calling event.consume() in the handler. (relevant javadoc comment):
    https://docs.oracle.com/javafx/2/api/javafx/stage/Window.html#setOnCloseRequest%28javafx.event.EventHandler%29
    Called when there is an external request to close this Window. The installed event handler can prevent window closing by consuming the received event.------
    You could check out my related answer at StackOverflow: http://stackoverflow.com/questions/12874664/javafx-entirely-customized-windows, for some other thoughts on this on customizing decorated and undecorated windows, but I think most has already been said in this thread.

  • Disabling the Close Button of JFrame or Frame

    Dear Friends,
    can anybody please help out to solve the problem i am having in disabling the close button of Jframe . Or try for hiding the close button from the screen
    thanks kalyan

    to disable the close button
    myFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE)

  • Popup window - Close button

    Hi,
    We have a requirement to disable/hide the standard close button present in the Internet Explorer while opening a popup window (the X icon present in the top right section of internet explorer window) . Any pointers on how to achieve this would be really helpful.
    Thanks in advance.

    I don't think it is possible to hide X of any window, as it is default feature of explorer by MSDN.
    --Mukul                                                                                                                                                                                                                                               

  • Disabling default close button in JFrame

    hi,
    in JFrame there are by default 'minimize', 'maximize' and 'close' button. is it possible to disable or not to show the 'close' button'
    regards,
    tom

    If you want to control the closing of the frame you can use
    frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)If you are interested in listening whether this button was clicked (for example as an alternative to a "Close" button you can register a WindowListener and handle the windowClosing(...) event
    About disabling/hiding - maybe you will have to subclass the frame header UI class, which is L&F specific.
    HTH
    Mike

  • Remove window close button

    have a small side frame that will only contain a single image. (sort of a preview image) controlled by the main frame.
    i want to remove the close window button on this side frame (maximize too, really), but defintily close.
    is there a way to do this ?

    Use a JWindow.
    Or use a JDialog and get rid of the title bar:
    dialog.setDefaultLookAndFeelDecorated(false) ;
    Or if you use a JDialog leave the title bar, but disable the buttons
    dialog.setDefaultCloseOperation(DO_NOTHING_ON_EXIT);
    dialog.setResizable(false);

  • Does Adobe Reader Disable window.close()?

    Help! I open a window using
    onclick='javascript:MyWindow=window.open("Meeting.pdf")'
    But the following fails when trying to automatically close that window
      <body onunload="MyWindow.close()">
    This same code works fine when MyWindow does not have a PDF file (for instance, onclick='javascript:MyWindow=window.open("Picture.jpg")' works fine).
    Almost seems as if Adobe Reader is disabling .close
    Any thoughts?

    Please repost in the Acrobat Scripting forum.

  • Safari 3.0.4 window close button and Command W not working

    Just upgraded to 10.4.11 and Safari 3.0.4, now I cannot close any Safari windows either by the Red button or command W. I am running a Powerbook G4. I had the same problem with previous beta versions of Safari.

    I was also experiencing this problem, and removing the library/input managers/SIMBL fixed it. But I dug a bit deeper, and found out that SIMBL looks in library/application support/SIMBL/plugins. I found a file in there called Taboo dated 5/8/2005 and removed it. Problem solved, even with the SIMBL files in the input managers folder.
    Hope this helps.
    Paul

  • Disabling the window close(x) button

    Is there any way to ensure that the window does not get unloaded when the close button (x) is clicked or can we simply disable the close button?
    regards
    Puneet
    Message was edited by:
    punsat

    As far as I know there is no way to differentiate between window closing events depending on their source.

  • To disable close button of the UDF form

    Hi,
    I need to disable the close button of a UDF form. Can anyone help me pls.
    Manu.

    Hi Manu,
    Herewith a code example... This would disable the close button on the Sales Order window (and only the first window)
      Dim oform As SAPbouiCOM.Form
      <i>'loop through all the forms here if you need</i>
      <i>'i am using "-FormType" here as the UDF window has the same UID as the normal form, but with negative sign</i>
      oform = oApplication.Forms.GetForm("-139", 0)
      Dim oItem As SAPbouiCOM.Item
      <i>'Close button is 4</i>
      oItem = oform.Items.Item("4")
      <i>'Disable button</i>
      oItem.Enabled = False
    Hope it helps,
    Adele

  • How to disable close button during runtime

    Hi everybody.,
    Please help me how to disable the close button at top of the window during runtime. I dont want the user to use that button to close. I have used button called Exit in that form but sometimes users closing by clicking that button.
    I am using Oracle form 10g R1.
    Thanks in Advance,

    Hi,
    Thanks Mr. Arif Khadas for your quick reply.
    While running the form, in window there will be two close button, one is in form and another one is in Internet Explorer. By making changes on the property what you said above this will hide only the form's close button. I want to hide the internet explorer close button also.
    Thanks in advance.

  • Disable Main Window Close

    I have developed an AIR application and here is my goal, I don’t want users been able to close the main window. I have tried to disable the close button but I thing that it is not possible. I would like to find a way to control that may be in trapping the close event of the window.
    Regards,

    You can listen to the Event.CLOSING event and preventDefault on it, for example:
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           creationComplete="init()">
        <fx:Script>
            <![CDATA[
                private function init():void {
                    addEventListener(Event.CLOSING, cancelClose);               
                private function cancelClose(e:Event):void {
                    if (!allowClose.selected)
                        e.preventDefault()
            ]]>
        </fx:Script>
        <s:CheckBox id="allowClose" label="allow closing" />
    </s:WindowedApplication>

  • Disable "Close" button of command prompt through LabVIEW using Win32 APIs

    Hello all,
    I am trying to disable the close button of a third party console application that I am invoking through LabVIEW. I tried using GetSystemMenu() and DeleteSystemMenu() from user32.dll, but somewhere I am doing it wrong.
    Can anyone can suggest a solution to this?
    Thanks!
    FraggerFox
    -FraggerFox!
    Certified LabVIEW Architect, Certified TestStand Developer
    "What you think today is what you live tomorrow"
    Solved!
    Go to Solution.

    Do you have the handle to Window?  Off hand, I don't know how to delete it, but here is some C# code that I used to grey out the close window button in another project:
            [DllImport("user32.dll")]
            private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
            [DllImport("user32.dll")]
            private static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem,
               uint uEnable);
            private const Int32 SC_CLOSE = 0xF060;
            private const UInt32 MF_BYCOMMAND    =0x00000000;
            private const UInt32 MF_ENABLED = 0x00000000;
            private const UInt32 MF_GRAYED = 0x00000001;
            private const UInt32 MF_DISABLED = 0x00000002;
            private void EnableClose(bool enable)
                IntPtr pSysMenu = GetSystemMenu(Handle, false);
                if (pSysMenu != null)
                    EnableMenuItem(pSysMenu, SC_CLOSE, MF_BYCOMMAND | (enable ? MF_ENABLED : MF_DISABLED));
    This was fairly easy to convert over once I had the handle (this is from a library I picked up somewhere).
    Hope this helps.
    A
    Attachments:
    WINUTIL.LLB ‏609 KB
    DisableCloseButton.vi ‏44 KB

Maybe you are looking for

  • Internet shuts off after a few minutes requiring wireless network reset on windows 8.1

    I recently upgraded from windows eight to windows 8.1 I do not know if this has anything to do with anything I have a 64 bit OS. My Internet goes off by itself every 5 minutes even though my wireless icon at the lower right of the screen still shows

  • ORA-22905 with pipelined function

    Hi, I have a strange behaviour that I do not understand. The code below does not work. It gives me the following errors: ORA-22905: cannot access rows from a non-nested table item ORA-06512: at line 10 ORA-06512: at line 19 The problem comes from the

  • Can I publish to my iWeb website?

    I have a website i created in iweb and its published on my external server ... can i publish my calendar to my website to have it be viewed by all?

  • Need Logic to retain the spaces of  disappeared UI Elements

    hi, i have certain UI elements on the layout ,during the execution these UI elements will disappear .So once they disappeared i need  those UI elements spaces to be retain there ,instead those spaces are replaced by the other UI elements. Thanks Gane

  • CS_BOM_EXPLOSION - Exception Handling

    Dear Friends I have use CS_BOM_EXPLOSION FM for explore material BOMs for some items its works properly for some materials it exception pass 1 (ALT_NOT_FOUND) i cant get what is the error please let me know to solve this problem hope my question is c