Java 类com.google.gwt.user.client.WindowCloseListener 实例源码

项目:jolie    文件:Echoes.java   
private void startClientSession()
{
    Value val = getLocationValue();
    JolieService.Util.getInstance().call(
        "startClientSession", val, new EchoesCallback() {
        @Override
        public void onSuccess( Value response ) {
            setWidgetValues( response );
            sid = response.getFirstChild( "sid" ).intValue();
            logicalClock = response.getFirstChild( "logicalClock" ).intValue();

            Window.addWindowCloseListener( new WindowCloseListener() {
                public String onWindowClosing() {
                    return null;
                }

                public void onWindowClosed() {
                    closeClientSession();
                }
            } );
        }
    } );
}