Window: close event handler

I have a button (action="dialog:ADD_MEMBER" useWindow="true" windowEmbedStyle="inlineDocument" windowModalityType="applicationModal" windowHeight="600" windowWidth="700"), which open a new window in the same TaskFlow. This window can be closed by using the special (my af:commandButton) button and by using common window close button ('X'). I want to write my custom close event handler in the second case. How can I do it?

Hi,
don't think you can. Did you check ifthe return listener fires ?
Frank

Similar Messages

  • First time data is not transported to pop up window through event handler

    Hi all,
    I am using NWDS 7.0, Now I want to open a pop up on click of a action link.
    There are two DCs DC-A and DC-B.
    I am calling action from DC-A to DC-B. DC-B contains view of pop up window.
    In DC-A I am using intreface controller of DC-B by using used coponents.
    Now In the DC-B used components I have created one fireplugin which is connected ith pop up view of DC-B and that firplugin is called from DC-A action to transport data from Dc-A to DC-B.
    Problem : when I click first time to open pop-up window then event handler is not called but the windows opened. When I close that window and again open the transported data start displaying on pop up window.
    So can you please help me that why first time data is not transported to pop up window.
    Thanks
    Kaushal

    You'll need to use an OARawTextBean. Oracle doesn't support opening links in new windows using OAFormattedTextBean. Just be aware that you'll need to set the CSS class in the HTML as well if you need it formatted a certain way.

  • Window close event

    hai friends
    have a peace day.
    i want to capture a window close event.
    for eg. while closing the window i want display alert msg.
    its work into forms but i want in main window.
    please give me sample code
    thanks
    rex

    hai thanks
    i have one more doubt.
    there was a problem in my project
    if click signout button my database change properly YES to NO
    but without signout they close the window , there was a problem
    the database would not change.
    how can i restrict this one.
    give idea.
    thanks
    rex
    Message was edited by:
    kingofpeace

  • How to detect window close event and do some task before exiting

    Hi 
    Anyone knows how to detect window close event and do some task before exiting ?
    Sridhar
    Solved!
    Go to Solution.
    Attachments:
    window close event.JPG ‏34 KB

    Yes .You can discard the panel close event by passing "TRUE" boolean value to the "discard ?" terminal which is lied in the right side of that panel close(filter) event.& It will work in executables.  See attached picture.
    Attachments:
    Panel Close.JPG ‏12 KB

  • New window in event handling

    hi to all
    i m beginner in java programming and i want to do event handling on mouse click. i have a button and i want if i click that button a new window open
    can anyone help me

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ActionEvents implements ActionListener
        JDialog dialog;
        public ActionEvents(JFrame f)
            dialog = new JDialog(f, "dialog");
            dialog.getContentPane().add(new JLabel("hello world", JLabel.CENTER));
            dialog.setSize(200,100);
            dialog.setLocation(425,200);
        public void actionPerformed(ActionEvent e)
            if(!dialog.isVisible())
                dialog.setVisible(true);
            else
                dialog.toFront();
        private JPanel getPanel()
            JButton button = new JButton("open dialog");
            button.addActionListener(this);
            JPanel panel = new JPanel();
            panel.add(button);
            return panel;
        public static void main(String[] args)
            JFrame f = new JFrame();
            ActionEvents ae = new ActionEvents(f);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(ae.getPanel(), "North");
            f.setSize(200,100);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Get the window close event !

    Hello !
    I have a popup window...
    I want to, when I close the popup window, something will be executed...
    I tried the OnUnload on the popup window... it worked, but it also executes when I reload the popup window !!!
    I just want to execute what I want ONLY when I really CLOSE the popup window...
    Any help???
    Tried "if (window.closed) ..." but didn�t work, it�s always false on the popup window...

    The same question was discussed many a times here. You just can't capture this event stright. You need to search for workarounds.
    Have a look at,
    http://forum.java.sun.com/thread.jsp?forum=33&thread=220036
    Sudha

  • Jvm unnamed windows events handle leak 1.3.1_08-b03 - 1.4.2-b28

    Hello,
    I have an server application that leaks windows unnamed event handles on small loads. (200 network connections) I've used the process explorer from www.sysinternals.com to find the type of handles that where leaking. I've run my application through jprobe several times and i'm not leaking any java objects. it doesn't happen on every run. It can run about 5 to 10 times with no leak but as i continue running a request that has 200 network connnections it will leak one handle. Over time they add up memory increases and eventually we get a out of memory error and the server has to be restarted
    My application uses the following
    java version "1.3.1_08"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_08-b03)
    Java HotSpot(TM) Client VM (build 1.3.1_08-b03, mixed mode)
    windows server 2000 service pack 3 (I've tried sp1 and sp2 same issue)
    starting and stopping threads
    inet jdbc driver una2000
    zlib compression libraries
    encryption DES
    sockets
    no jni code
    My network code uses input.available() and Socket.setSoTimeout() I don't think the setSoTimeOut time is timing anything out on these small runs.
    I've also have run it with
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    I've tried not stopping any threads from my thread pool and it made no change. It still leaks! :-(
    Does anyone know what creates the unamed event handles? Are they created by synchronization? Since my applications uses so many different api's it's like looking for a needle in a hay stack.
    p.s. I've been working on this problem on and off for about 1 month. I've search the java forums and google.
    Thanks
    Alexander Anguiano

    My message has been here for a while and is off the first page. :-( Oh, well. I thought I would update this just incase anyone was following it. (can I award my self those duke dollars?)
    I think i've found the problem of why we are leaking handles. In the first 10 minutes it leaked 3 handles.(they may not have leaked but are resource that our application needed because of all the lazy initialization that we do) I've been runing a 200 task request every 5 minutes for the last 6 hours and have not leak any handles. The problem appears to be with calls to socket.setSoTimeout. I set it to 0. This effectively tells the socket to never time out. This is not an acceptable solution to the problem. I will be working on that next.
    Has any one had problems with the socket.setSoTimeout?
    If not then it may have to do with our simulated select. We have one thread that handles connection. Once the connection is established it's put on a list that get's polled [input.available()] that is handled by thread 2 if there is data then it gets handled by a worker thread [thread n-12]. Once the worker thread has read up to 4K of data it is put back on thread 2. I'm thinking that it has to do with so many thread doing a little work on it.

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

  • Event handling for closing a browser window on portal in web dynpro abap

    Hi,
    I am new to portal as well as web dynpro. Is it possible to handle portal events in web dynpro abap? My requirement is whenever a browser window is closed on portal, if any new system messge has been added I want to display them in a pop-up. I checked examples from the package 'SWDP_TEST' but they trigger events in web dynpro and pass them to portal. I want to subscribe to the close event of portal and handle it in my web dynpro abap application. How can I achieve this? Please suggest.
    Thanks and regards,
    Amrutha

    Amrutha S wrote:
    Is it possible to handle portal events in web dynpro abap? My requirement is whenever a browser window is closed on portal, if any new system messge has been added I want to display them in a pop-up. I checked examples from the package 'SWDP_TEST' but they trigger events in web dynpro and pass them to portal. I want to subscribe to the close event of portal and handle it in my web dynpro abap application. How can I achieve this? Please suggest.
    Hi,
    I dont think that you can code to close IE browser window as you cannot access MS IE APIs in WD ABAP. I looked into closing IE browser and got http://p2p.wrox.com/general-net/16588-handling-ie-close-event.html . reading this, it seems the coding can be done in C#(asp) etc.
    also refer Closing of IE window
    I hope this is useful for you.
    Thanks,
    Chandra

  • Handling Mac Close events

    I'm having an issue handling the various close event when running my application on a Mac. (all fine on Windows)
    When loading the page I execute this statement:
    window.nativeWindow.addEventListener(air.Event.CLOSING, MainWindow_OnClosing);
    The code to handle this event is as follows:
    var MainWindow_OnClosing = function(event){
            event.preventDefault();
            window.nativeWindow.visible = false;
    I need this handler so that the application returns to the Doc when hitting the standard Chrome close button.
    The problem I have is that this event also fires when a user hits the Command-Q comment (and also when the user shuts down the mac). This prevent the application from closing which is not what I want to do. The only way to close the application seems to be the ForceQuit command.
    Does anyone know of a way to distinguish between the close event from the Chrome close button and the close event from the Command-Quit or shutdown event?

    Yeh, thing is these are just data object, not anything graphical... but i want my graphical components to update when their data is changed.
    Ive actually just now re-organised it a bit, ive set up each data object to have its own listeners, where as before i had the gui component had listeners...
    Is there anything in the java api that i could extend to include listeners? otherwise ill just make one...

  • How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?

    How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?
    I have a HTML extension running in In-design CC 2014 version.
    I want to perform some required set of actions before my extension window is closed(by clicking on the cross button on top right corner).
    Does In-design throws any event for it? Or can we capture it using C++ plugin in some way?

    Naah.......haven't got any event for that yet.
    Although, since HTML extensions are using chromium browser,  as a workaround, u can attach listener to HTML onClose event, but it won't solve any purpose if you
    are looking to logout session or do some business login in your code.

  • Error in event handler method in window

    Hi,
    I have created configuration in SEFVISU, to receive the workitem i have created a parameter in event handler method in window
    but it is throwing dump The ASSERT condition was violated, if i remove that parameter means application executing properly but i am not able to pass the unique, values please guide me.
    Regards,
    Srini.

    Hello Srini,
    are you talking about the default event handler method of the window? if so then you need to ensure that the parameter name defined in the event and passed in name are same. And also its better to go for the parameter type as STRING.
    other option would be instead of defining the static parameters in the event handler method, you can get the parameters from the WDEVENT itself by accessing WDEVENT->PARAMETERS table.
    hope this helps.
    BR, Saravanan

  • Event Handling - Swing Window to Console Switch

    I have a serious problem with an app I am writing - I have a swing 'main menu' system built around a standard JFrame which calls a new instance of another class. This other class takes input from the keyboard and is displayed in the standard console window; i.e Using the standard System.out.print() syntax.
    My problem is the Swing window will not release the input stream to allow the conole to take input from the keyboard. I have implemented inner-classes within the 'main menu's' class for event handling purposes; in this case the mouse-clicks of the menu's JButton components. The problem only manifests itself when the inner-class' event handling code is called - I wrote some test methods to call the console classes code without using the inner-class' and the console works perfectly. It is my conclusion, therefore, that the calling of the console-based method from within the inner-class of the Swing super-class reserves the input for the Swing components, failing to reactivate the console. I have tried creating new InputStream objects but to no avail.
    Does anyone know how to release or terminate the methods within the inner-classes (they are all void / no return type as they implement the ActionListener abstract class)? This, I hope, will return the focus to the console.
    Any advice would be most greatfully received.
    LEC.

    If you were to have your connection object declared so that it could be referenced from anywhere in your class then you could use it in you actionPerformed method. For example:
    public class Test extends JFrame
    &nbsp&nbsp&nbspprivate Connection con = null;
    &nbsp&nbsp&nbsppublic void actionPerformed(ActionEvent e)
    &nbsp&nbsp&nbsp{
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbspMyDetails appmydet = new MyDetails(con, id); //connection, userID
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbspappmydet.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
    &nbsp&nbsp&nbsp}
    &nbsp&nbsp&nbsppublic void setConnection(Connection theCon)
    &nbsp&nbsp&nbsp{
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbspcon = theCon;
    &nbsp&nbsp&nbsp}

  • Event handling operation on other software windows

    Hi friends
    I am able to execute another external program through java code using
    Runtime.getRuntime().exec();
    But now I want to perform Event Handling operation on such a opened external program(software) window.
    Is it possible in Java to perform Event Handling operation on other software windows.
    Thanks

    Can anybody give me some idea. I already gave you hte idea. I told you to write the C++ code to do it. There is no other way. You cannot do that from Java.
    WRT the sockets post:
    whether you use JNI or sockets: the accessing code will still not be written in Java. Hence you still can't do it in Java.

  • Opening a new window from an event handler in IC WebUI

    Hello ,
    I want to open a new browser window on the click of a button (through the event handler) .This can be done using javascript ,but I ideally want it to be triggered from the event handler .The URL is dynamically
    generated . Please do let me know if there are ways to achieve this .

    Hi,
    In the place where you declare your button write this code.
        ls_button-id = xx.
        lv_string1 = 'javascript:window.open( "'.
        lv_string2 = '" );'.
        ls_button-on_client_click = 'javascript:window.open( "lv_url");'
        CONCATENATE lv_string1
                    lv_url
                    lv_string2
                    INTO lv_string3.
        ls_button-on_client_click = lv_string3.
        ls_button-enabled = abap_true.
        APPEND ls_button TO gt_editbutton.
    pass your dynamic URL here to lv_url. Dont Pass anything to ls_button-on_click.
    You can do this coding in DO_PREPARE_OUTPUT or IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS wherever your button is present.
    Regards,
    Masood Imrani S.

Maybe you are looking for

  • How to handle migrating files to a new drive and Time Machine

    I have recently moved to an SSD in my Mac Pro.  As such, I am going from a 2TB main drive to 256GB.  This is no problem, as the majority of my 700GB of files are old work and don't need to live on the speed of the SSD.  My plan is to leave them on th

  • Error handling in ABAP proxies

    Hi, Please let me know the different ways by which error handling can be done (both at XI side and also the SAP R/3 side) in the case of ABAP inbound and outbound proxies. Basically 1. In the case of message posting to SAP R/3 using ABAP proxy (Inbou

  • PCA document not generated

    Dear friends, The two packing material having the same master data, issued to one cost center. But for one material the PCA line item is not generated. can you please give me any clue? Thanks VInay Thakre

  • Why cant my pictures turn to the side?

    My videos and pictures will not turn to the side horizontal, neither will my itunes music! Can anyone help?

  • EJB 3 jndi lookup from glassfish to glassfish

    Hi, I have a big problem with remote access to EJB3 deployed on a glassfish server . I can get it work from a SE client or a Tomcat server but when I deploy the same code on another glassfish server, I get a javax.naming.NameNotFoundException. Here i