Window-Closing Events

Please, clarify the sequence. When user clicks a "cancel" button on a JDialog's descedant, I make clean up and call dispose. I've hooked hide and dispose methods of the dialog and getting the followind sequence:
disposing
hiding
disposing
hiding
That is, hide and dispose are called twice by swing. Initially, I was considering using a hook at hide or dispose for performing a clean-up action. However, doing clean-up twice is bad idea.

Use java.awt.WindowListener and the Window.addWindowListener method (JDialog descends from Window). From the javadoc:
void windowClosed(WindowEvent e)
Invoked when a window has been closed as the result of calling dispose on the window.
void windowClosing(WindowEvent e)
Invoked when the user attempts to close the window from the window's system menu.
I haven't tested it to see how many times it gets called, but I would guess only once.

Similar Messages

  • Catching window closing events from JFrame

    I'm having problems catching windowClosing() events from a JFrame (just doesn't get to my event listener it would seem!).
    I register and setup a window listener in the constructor of my JFrame class. Prior to this I set the default close operation as DO_NOTHING_ON_CLOSE (as you're suppose to if tyou want to handle window closing events).
    When user clicks on x (window terminate) button (in WIN systems), nothing is dispatched to my event listener. Any ideas?
    Extract from constructor:
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    addWindowListener(new MainWindowListener(this));
    MainWindowListener looks as follows (EDImemConvert extends JFrame):
    class MainWindowListener extends WindowAdapter
    private EDImemConvert f;
    public MainWindowListener(EDImemConvert f)
    this.f = f;
    public void windowClosing(WindowEvent e)
    System.out.println("gets here...");
    f.ReturnResources();
    f.dispose();
    System.exit(0);
    }

    This works for meimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
      public Test() {
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent we) { System.exit(0); }
        setSize(300,300);
        setVisible(true);
      public static void main(String args[]) { new Test(); }
    }Normally, I just use this line
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    instead of adding a listener. It will clean up everything nicely.

  • Detect window closing event in AIR application

    How do I detect the window closing event in an AIR app? Tried
    the following.
    deactivate and windowDeactivate events in the
    WindowedApplication tag.
    addEventListener(Event.CLOSING, onClose);
    addEventListener(AIREvent.APPLICATION_DEACTIVATE onClose);
    addEventListener(AIREvent.WINDOW_DEACTIVATE, onClose);
    None of them seem to work.
    Any ideas?
    Thanks
    CS

    The following works for me:
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    closing="traceEvent(event)"
    windowDeactivate="traceEvent(event)"
    applicationDeactivate="traceEvent(event)">
    <mx:Script>
    <![CDATA[
    public function traceEvent(event:Event):void{
    trace(event.type);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    As does:
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    applicationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.AIREvent;
    public function init():void{
    this.addEventListener(Event.CLOSING, traceEvent);
    this.addEventListener(AIREvent.WINDOW_DEACTIVATE,
    traceEvent);
    this.addEventListener(AIREvent.APPLICATION_DEACTIVATE,
    traceEvent);
    public function traceEvent(event:Event):void{
    trace(event.type);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>

  • Closing a Swing App with Window Closing Event With Dialogs On Close

    A while back I started a thread discussing how to neatly close a Swing app using both the standard window "X" button and a custom action such as a File menu with an Exit menu item. Ultimately, I came to the conclusion that the cleanest solution in many cases is to use a default close operation of JFrame.EXIT_ON_CLOSE and in any custom actions manually fire a WindowEvent with WindowEvent.WINDOW_CLOSING. Using this strategy, both the "X" button and the custom action act in the same manner and can be successfully intercepted by listening for a window closing event if any cleanup is required; furthermore, the cleanup could use dialogs to prompt for user actions without any ill effects.
    I did, however, encounter one oddity that I mentioned in the previous thread. A dialog launched through SwingUtilities.invokeLater in the cleanup method would cause the app to not shutdown. This is somewhat of an academic curiosity as I am not sure you would ever have a rational need to do this, but I thought it would be interesting to explore more fully. Here is a complete example that demonstrates; see what you think:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.BoxLayout;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class CloseByWindowClosingTest {
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        launchGUI();
         private static void launchGUI() {
              final JFrame frame = new JFrame("Close By Window Closing Test");
              JPanel panel = new JPanel();
              panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
              JButton button1 = new JButton("No Dialog Close");
              JButton button2 = new JButton("Dialog On Close");
              JButton button3 = new JButton("Invoke Later Dialog On Close");
              button1.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        postWindowClosingEvent(frame);
              button2.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        JOptionPane.showMessageDialog(frame, "Test Dialog");
                        postWindowClosingEvent(frame);
              button3.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        SwingUtilities.invokeLater(new Runnable() {
                             public void run() {
                                  JOptionPane.showMessageDialog(frame, "Test Dialog");
                        postWindowClosingEvent(frame);
              panel.add(button1);
              panel.add(button2);
              panel.add(button3);
              frame.setContentPane(panel);
              frame.pack();
              frame.setLocationRelativeTo(null);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.addWindowListener(new WindowAdapter() {
                   @Override
                   public void windowClosing(WindowEvent event) {
                        System.out.println("Received Window Closing Event");
              frame.setVisible(true);
         private static void postWindowClosingEvent(JFrame frame) {
              WindowEvent windowClosingEvent = new WindowEvent(frame, WindowEvent.WINDOW_CLOSING);
              frame.getToolkit().getSystemEventQueue().postEvent(windowClosingEvent);
    }An additional note not in the example -- if in the button 3 scenario you were to put the window closing event posting inside the invoke later, the app then again closes. However, as implemented, what is it that causes button 3 to not result in the application closing?
    Edited by: Skotty on Aug 11, 2009 5:08 PM -- Modified example code -- added the WindowAdapter to the frame as a window listener to show which buttons cause listeners to receive the window closing event.

    I'm not sure I understand why any "cleanup" code would need to use SwingUtilities.invokeLater() to do anything. Assuming this "cleanup method" was called in response to a WindowEvent, it's already being called on the EDT.
    IIRC, my approach to this "problem" was to set the JFrame to DO_NOTHING_ON_CLOSE. I create a "doExit()" method that does any cleanup and exits the application (and possibly allows the user to cancel the app closing, if so desired). Then I create a WindowListener that calls doExit() on windowClosingEvents, and have my "exit action" call doExit() as well. Seems to work fine for me.

  • How to trap applet window closing event?

    Hi all,
    I would like to know how could one trap the event of the browser window containing an applet being closed by the user?
    Thank you,

    Hi. this would be useful to me too.
    Trouble is, I'm not sure that you can. applet.stop( )
    and applet.destroy( ) might be called, but there is
    no guarentee that you can complete processing before
    you are terminated, especially if you need to do
    something slow, like returning state data to your
    server. And you can't stop the broswer closing.
    I know that in Javascript, you can catch and even
    stop the browser window being closed, which is how
    things like goggledocs can ask for confirmation
    before closing. (window.onbeforeunload( ) ).
    I have toyed with the idea of having a
    javascript/ajax thread in my html, to catch this
    termination, and communicate back to the server from
    java to say a document has changed, but it all seems
    rather heavyweight for such a simple task.Look at Runtime.addShutdownHook()
    You could also try using a WindowListener as well and trap the WindowClose Event.
    stop() should do very little other than invalidate the current thread/run flags
    and then exit. ie: a stop() example
    public void stop()
    task = null;
    or
    public void stop()
    running = false;
    Your run method should look for a stop condition and then exit.
    Otherwise you could be doing stop processing while run is still
    running.
    (T)

  • How to fire a window closing event, not clicking the X button of the UI

    I�ve an application that uses a WindowListener for the WindowClosing event of a JFrame. When the user presses CTRL-Q I needed to fire a windowClosing for that frame, in order to detect it and take some actions in the class referencig the JFrame (this class has the windowListener).
    setDefaultCloseOperation was not good for me, so i fire the windowClosing event with the following code:
    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
        WindowEvent we = new WindowEvent(this,WindowEvent.WINDOW_CLOSING, null, 0, 0);
        this.getWindowListeners()[0].windowClosing(we);
    }Hope this is the right way to fire the event and this helps someone. If not please code a better way,
    Alonso

    Yes, that works and looks better:
    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                            
       this.dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
    } "this" refers to the JFrame.

  • Window closeing event

    Hi all,
    I,ve created a Bank Class, that creates Atm ,s from a button in the bank
    can someone show me how to close each frame individually instead of all at once
    this is were i create the atm class
         public void actionPerformed(ActionEvent {
    if(ae.getSource( ) == b1)
    laB2.setText("Atm "+index+" now Created");
    b1.setLabel("Atm"+index);//creates atm labeled in bank     
    Atm Atm1 = new Atm(hsbc);
    //Atm1.setText("Atm"+index);
    [code\]
    Thank you very much

    Ref Above, i get the following Error,
    Hope you can Help
    Thanks Again
    public void actionPerformed(ActionEvent ae){
    if(ae.getSource( ) == b1)
    Atm Atm1 = new Atm(hsbc);
    Atm1 .addWindowListener(new vWindowAdapter()                
    public void windowClosing(WindowEvent win_eve)
    Atm1 .setVisible(false);
    [code\]
    --------------------Configuration: j2sdk1.4.0_01 <Default>--------------------
    C:\Assignment2\Ass2 Code\Assignment2.java:189: local variable Atm1 is accessed from within inner class; needs to be declared final
                                  Atm1 .setVisible(false);
                                                    ^
    C:\Assignment2\Ass2 Code\Assignment2.java:189: cannot resolve symbol
    symbol  : method setVisible  (boolean)
    location: class Assignment2.Atm
                                  Atm1 .setVisible(false);
                                                         ^
    C:\Assignment2\Ass2 Code\Assignment2.java:185: cannot resolve symbol
    symbol  : method addWindowListener  (<anonymous java.awt.event.WindowAdapter>)
    location: class Assignment2.Atm
                               Atm1 .addWindowListener(new WindowAdapter()

  • Frame window closing

    Hi friends,
    please help me in following situation.
    I have a frame1, where i have a button to open new frame2. this frame 2 opens some other frames.
    When i close main frame1, i want to trigger a event or execute a method on other frames. i tried window closing and window closed events from frame1 or frame2.
    frame2 and frame3 windows r just closing without any events when i close main frame1.
    frame2 and frame3 must extend JFrame not JDialog.
    thanks,

    make in each frame a lille method that calls the next frame (if there is one) and waits until he gets something in return...
    so 1 calls 2, 2 calls 3....
    3 is the last frame and shuts itself down, but first it returns a value to 2.
    then 2 knows it can return a value to 1 and closes itself...
    that's the thing i would do... but never tried it yet so dunno about the speed it goes....
    leme know if I helped you out.
    SeJo

  • Performing some actions before window closing in browser

    this can be done by <body onbeforeunload='delcookie()'>
    delete cookie is a javascript function where i put inthe code to delete the cookie of my page when some one closes the page or some thing else load in that window.
    this works even if window closes or some other page loads into the window. onunload can also be used it .it works in the second case only.

    Hi Sunil,
    You can retrieve the application properties in your code by:
    IWDApplicationInfo application = wdComponentAPI.getApplication().getApplicationInfo();
    String value = application.findInApplicationProperties("<property name>").getValue();
    for eg: you can retrieve expiration time as:
    application.findInApplicationProperties("sap.expirationTime").getValue();
    But expiration time is the time after which the application expires and has nothing to do with the real time
    About the application closing, as far as I know there is no event in webdynpro to capture the window closing event. So it depends on how the user closes the application. If he closes the application from within it using some button or link, then you can very well write the required code there. If he closes the browser directly, then I don't think you can handle that.
    Hope this helps,
    Best Regards,
    Nibu.

  • How to tell embedded jinitator applet is still running when window closed

    Hello, we are trying to accomplish the same thing that is mentioned in this post from Metalink. I've searched for a solution and hope someone here can help. Instead of restating the issue I think David Wilson does a good job of explaining what is needed. Can anyone please suggest a possible solution?
    From: David Wilton 07-Oct-05 01:08
    Subject: How to tell embedded jinitator applet is still running when window closed
    How to tell embedded jinitator applet is still running when window closed
    Hi,
    We run an oracle 10g forms application through 9iAS over an intranet. All users are running windows 2000 professional.
    We run separate frame = true but I would like to switch to separate frame = false
    With separate frame = true if the user clicks the outer windows "X" close button (forms mdi window) the user is prompted to save changes before the application ends.
    BUT
    when using separate frame = false
    If the user clicks the upper window "X" button (no longer form mdi window but regular browser window) the window and application is abruptly closed.
    I'm interested in using a onbeforeunload function to confirm if the user wants to close the window. This would be placed in the basejini.htm file. This could always ask if the user wants to exit or not. If they click OK then the window closes but if they click "Cancel" you are returned to the forms application exactly where you left. something like event.returnvalue="do you really want to exit?";
    However if the user exited using the normal exit form method then the applet is already closed before the onbeforeunoad event fires and there is nothing to go back to and I want the window to close automatically. This is accomplished using close.html file in post forms trigger.
    So what I want and what I think many may also want is the check if the embedded applet is still running and if so prompt the user to return to the application or continue to close. Of course If the applet is no longer running then just close because there is no reason confirm closing anymore.
    Does anyone have a html/JavaScript solution that can be placed in the jinitiator.htm file? or similar?
    Thank you
    David
    [email protected]
    From: Andrew Lenton 07-Oct-05 08:58
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I don't know if this is exactly what you are after but you can add the following to the top of your basejini.htm file and it should prompt the user before exiting the IE window.
    <BODY %HTMLbodyAttrs%>
    %HTMLbeforeForm%
    <SCRIPT>
    <!--
    window.onbeforeunload = unloadApplet;
    function unloadApplet(){
    message = "Warning! Please exit the Java Applet prior to
    exiting the browser"
    return message;
    //-->
    </SCRIPT>
    From: Oracle, mohammed pasha 07-Oct-05 09:55
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    David,
    Well I could not understand your complete requirement.
    Refer to Note.201481.1 How to Close the Browser Window When Closing Forms And How to Simulate SeparateFrame By Javascript
    Note.115905.1 How to Close Browser Window When Closing Webforms Applet
    Kind Regards,
    Anwar
    From: David Wilton 07-Oct-05 14:37
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Thank you for your reply and yes you did not understand my question fully.
    Sorry if this is a long reply
    I am able to close the browser window using information in notes 115905.1 and 201481.1, this is not the issue. We implemented this several years ago. It is workable for both separate frame = true or false.
    It is most important to not allow the user to end their forms application by closing the windows browser, they must close using normal form exit commands.
    What I want is to have separate frame = false, the big drawback to this option is the user can exit the application and bypass all forms code by pressing the windows "X" close button. This is why we need the code as just provided by Andrew Lenton above in this thread.
    BUT Andrew's code will always prompt the user before closing the window and I do not want that. I want the user to be prompted only under scenario 2 listed below.
    Here's the 2 case scenario for exiting the application.
    1. If the user closes properly and uses exit form which fires all normal form triggers including post_form with it's call to close.html file.
    All uncommitted changes are saved or rollback and the users session is ended normally both on the database and in the application server.
    All browser windows will close, great all is good. And without Andrew's code the window will close but with Andrew's code the user will be prompted to close or not, if they select Cancel the window will remain but the applet has already ended so why prompt? ...This is what I want to avoid.
    2. In the forms app. if the user clicks the windows "X" close button with uncommitted changes. The browser just closes the changes are rollback without prompting the user to save. The users sessions are now lost and still running in the database and application server until they are timed out.
    If I use Andrew's code then the user will be prompted to continue to close or go back, if they click Cancel to go back then focus returns to the forms application and the user can continue to work. If the user clicks OK then the window closes and unfortunately their sessions are still lost until timed out.
    So what I desire is to add to Andrew's code to check if the embedded applet is still running and prompt the user to close or not accordingly.
    Something like:
    Basejini.htm like
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function maximizeWindow()
    window.moveTo(0,0);
    window.resizeTo(screen.availWidth,screen.availHeight);
    function confirm(){
    If(document.embeddedapplet.closed())
    Win.opener = self;
    win.close();
    Else if
    event.returnValue = "Closing Forms Application. OK to continue?";
    </SCRIPT>
    <BODY %HTMLbodyAttrs%, onload="maximizeWindow()", onbeforeunload="confirm()">
    %HTMLbeforeForm%
    I hope this explains my requirements.
    David
    From: Oracle, Evelene Raechel 10-Oct-05 06:45
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Hi,
    Note.199928.1 How to Alert User on Closing Client's Browser Window in Webforms
    Regards,
    Rachel
    From: David Wilton 11-Oct-05 17:40
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I'm sorry this is not helpful at all.
    Note 199928.1 is only an alert which does not stop the closing of the window and still displays as an alert if the user does close properly using exit form ... so why would you want to display the alert then?
    This is exaclty what I do not want and why I want to determine if the applet is still running before displaying any kind of message.
    David
    From: Oracle, Evelene Raechel 17-Oct-05 12:23
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Closing thread.
    Thanks,

    Hello,
    I had the same issue last year - wanting to provide a warning on closing the browser, but only if the Forms session is still running. The approach I took is described below, see also the thread where I originally posted this at Closing brower window
    Hi there,I've had a similar requirement - or rather, the two conflicting requirements: to warn when the browser is being closed, but for the app to be able to close the browser without a warning being fired.
    To always provide a warning when someone (the user or the Forms app) tries to go to a different page (e.g. your close.htm), use Javascript like:
    function confirmExit(){
    if(appletRunning==true) {
    msg="Closing this window or navigating to another page will end your SomeGreatApp session.";
    window.event.returnValue=msg;
    And make a call to confirmExit() in the onBeforeUnload event of your main page.
    You'll notice I first check an 'appletRunning' variable before displaying the warning. This Javascript variable is set to true by my app when it starts up, using an embedded Javabean that calls out to Javascript. Once that variable is set to true, then the warning will be displayed if the user tries to shut the browser by clicking on the 'x' button, or to go to a different URL.
    When my app is shutting down, it uses the same Javabean to set appletRunning back to false. It then navigates to a close.htm - which will be done without a warning being displayed.
    See Re: How can a Javabean call Javascript function of the basejpi.html?? for example code on how to call Javascript from a bean embedded in your Forms app.
    Hope these ideas help you out, it's worked for me (so far, anyway!!)
    James

  • Data changes saved when pop-up window closed instead of using Save button/action.

    We encountered an odd application behavior and we cannot tell if this is standard functionality or not.  When a spec is an a workflow step that is Signature Request, the Requestee can open a link to view the spec.  When the user also has edit permissions, they get the edit icon in the popup window.  We had a user that editted the spec then decided not to save the changes, so used the Close (red ex on popup) instead of the Action: Cancel button on the application menu. User expected that changes made would not be saved. It turns out that clicking the window closed save the modifications without any warning.  User expected Close to work like Cancel instead of Save.  Is this normal application behavior?
    Details.  Version 6.1.1.1 on IE9 with popup. 

    Did they make a change, close the popup, then workflow the Signature Request? Is so, then this is behavior we expect: When you are viewing a spec, you are viewing the in memory version of it, meaning that if you edit the spec, the changes are made to the in-memory version. If then clicked close, the in memory data is still loaded for that spec, and it may be that the signature request workflow event then saves the spec with those changes. The cancel button would have reverted the changes.
    You can, however, log an Enhancement Request for having the window close act like the Cancel.
    Thanks
    Ron

  • Window closing error

    i written a java program for swing form. the form having default window close button. if i click on close button i displayed a dialog contained Yes-No-Calcel . if i click on cancel it will be exit. How can i stop the window closing.

    Look at this codes:
    import java.awt.event.*;
    import javax.swing.*;
    public class ClosingFrame extends JFrame {
         public ClosingFrame() {
              super("Closing frame");
              setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        int res = JOptionPane.showConfirmDialog(ClosingFrame.this, "Do you want to quit?", "Exit", JOptionPane.YES_NO_OPTION);
                        if (res == JOptionPane.YES_OPTION) {
                             System.out.println("Bye");
                             System.exit(0);
                        else {
                             System.out.println("So you stay!");
              setSize(200,200);
              setLocationRelativeTo(null);
              setVisible(true);
         public static void main(String[] args) {
              new ClosingFrame();
    }Denis

  • LocalDrive, remoteDrive error being logged to Windows Application event log

    Post Author: yday
    CA Forum: Data Integration
    Hi all,We are finding the following error messages being constantly logged to the Windows application event log:Event ID: 4096Source: Data Integrator"The error: localDrive: LocalDrive1; localDriveValue:  "andEvent ID: 4096
    Source: Data Integrator
    "The error: remoteDrive: RemoteDrive1; remoteDriveValue: "Another user noted as having the same problem in the old BO Support Forum:http://support.businessobjects.com/forums/message.asp?fid=568&mid=171195  We are also running Data Quality XI R2 (11.5.1.0) on the same server.  This problem has been happening for as long as I can remember.  It does not appear to cause any jobs to fail, but we would like to resolve this to prevent error messages being logged to computer management. Can anyone suggest a solution?  Product: Data Integrator XI R2
    Version: 11.7.0.0
    Patches Applied: None
    Operating System(s): Windows Server 2003 w SP1
    Database(s): Oracle 10gR2
    Error Messages: remoteDrive, localDrive error (as above)Steps to Reproduce: Restart the job server and the error appearsThanks and regards,York DAY

    Post Author: yday
    CA Forum: Data Integration
    Ben,
    I have just installed DI 11.7.2.0 and it is still an issue!  The bug has not been listed in the release notes in either the resolved issues section, or the known issues section.
    Australia support told me it would be fixed in the next service release.  This was well before 11.7.2.0 was released.
    I've opened another support case as I closed the last one, believing it was resolved.  From our perspective, it is not even being shown as a known issue with the product at this stage - so I will be keeping my support issue open this time until I see it is fixed.
    My support case number is 302810798 FYI.
    Rgds,York

  • Does window.onerror event works in Safari?

    Hi there,
    I have been struggling to make my page compatible with Safari where I have to register window.onerror event with my function. First of all, is this event supported in my Safari 1.3.2 version.
    Secondly, this event is registered in my child window which is checking the Parent page URL every 1 sec. As soon as the parent page URL is changed or closed, I am calling the parent.location.href which should throw an exception. This should get capture by this window.onerror event. But its not doing that in Safari. I see the JavaScript Console and it keeps showing type error: null undefined.
    It works in IE/NE/FF under Windows.
    Is there some other way of doing this in Safari?
    Any help will be appreciated.
    Thanks in adv.
    J-Anwar

    Hello KiranKumar,
         You should avoid using the prePrint event to hide or show the objects at run time. Refer the below link to know why.
    Adobe&amp;#160;LiveCycle&amp;#160;ES3 * prePrint event
    If you want to achieve this requirement, then write the script in Initialize event since it is an offline form. Then the issue will be resolved.

  • NetConnection.Connect.Closed event not triggered in Vista FF3 when in fullscreen mode

    Hello Pals -
    I'm trying to handle the net connection drop and provide some kind of visual cue to user. For this I'm listening to NetConnection.Connect.Closed event and when its triggered, I take further steps. The events are triggered in Vista FF3(window mode)/IE7 but in Vista FF3 full screen mode, the event is not triggered. I forcefully disconnect the network cable to see the NetConnection.Connect.Closed event is triggered.
    I have following piece of code to listen to the event,
    nc = new NetConnection;
    nc.addEventListener(NetStatusEvent.NET_STATUS, onStatus, false, 0, true);
    nc.connect();
    public function onStatus(event:NetStatusEvent):void {
    trace("Status " + event.info.level + " : " + event.info.code);
    The function onStatus should be called whenever there is a status change in net connection. The events are not triggered in Vista FF3 full screen mode. Please share your views/ideas about this here. Thanks in advance. Please let me know incase more information is required.

    The problem decribed as above was caused by a fragile and eventually broken soldered connection on the curcuit board. My local dealer replaced the curcuit board and everything works fine again.
    I still wonder how that happend. I did not try to bend my MacBook and it did not fall of my desk.
    Thanks for reading.

Maybe you are looking for

  • On IPhone 5S, when making cell calls, it connects to FaceTime.

    On IPhone 5S, IOS 7.1.2, when making cell calls, it connects to FaceTime.

  • Calling a web service in Oracle forms

    Hi, I find problems when trying to use a web service in the oracle forms. The problem is in the "select ...". the error shows that the type must be an sql authorised type. can somebody help me? this is the source of my program: declare lespays ORA_JA

  • Script: chrome://browser/content/places/browserPlacesViews.js:229

    Greetings! I run Firefox on Windows XP3 Home, and I would appreciate your advice on some problems I have. When I click on Bookmarks, nothing happens for about 30 secs, then the following message appears; "Script: chrome://browser/content/places/brows

  • Can you use the Sapphire PCIE Graphics Card on the Xeon Power Macs ?

    Hi, does anyone know if you can use the Sapphire 11168-02-20R HD 5670 512MB GDDR5 PCIE Graphics Card on the xeon intel power macs  ? I did see on on another discusion that the ATI Radeon cards were all good, but I wanted to check. Cheers K

  • CreateClassObjet

    Hi there, I have my component in my flash library and the actionscript class file for that component in the same directory......if I drag the component onto the stage, the class is linked properly as I can set inspectable properties of the component.