Project

General

Profile

Bug #1065

WMessageBox.show problem in JWt SimpleChat example

Added by David Hubbard about 10 years ago. Updated about 10 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Pieter Libin
Category:
-
Target version:
-
Start date:
11/21/2011
Due date:
% Done:

0%

Estimated time:

Description

Running the latest git (cloned 21/11) in Eclipse with Jetty.

After running guest chat sessions, when hitting "Logout" the MessageBox doesn't display, Browser session sticks on "loading" for a bit and then refreshes the browser, but original users are still flagged as "in use" i.e. logout() code isn't getting activated.

I've traced this (I think) to the use of the "StandardButton result = WMessageBox.show" statement - if I comment it out the logout gets performed.

So, I think there is a problem with the WMessageBox.show function, as it works when I patch code to use separate creation, show and event handling (as per Dialog example) as:

final WMessageBox box = new WMessageBox("Please Confirm", "Do you really want to logout?",

Icon.NoIcon, EnumSet.of(StandardButton.Yes, StandardButton.No));

box.show();

box.buttonClicked().addListener(this,

new Signal1.Listener() {

public void trigger(StandardButton result) {

box.remove();

if (result == StandardButton.No)

return;

if (listener_ != null) {

server*.chatEvent().removeListener(listener*); // do not listen for more events

listener_ = null;

server*.logout(user*);

letLogin();

}

}

Regards

Dave


Files

1065_JBoss_SimpleChat_Logout_Async_False_Exception.txt (4.79 KB) 1065_JBoss_SimpleChat_Logout_Async_False_Exception.txt Logout on JBoss with Async False David Hubbard, 11/23/2011 08:56 PM
1065_JBoss_SimpleChat_Logout_Async_True_Exception.txt (265 Bytes) 1065_JBoss_SimpleChat_Logout_Async_True_Exception.txt Logout on JBoss with Async True David Hubbard, 11/23/2011 08:56 PM
1065_Jetty_SimpleChat_Logout_Async_True_Exception.txt (2.77 KB) 1065_Jetty_SimpleChat_Logout_Async_True_Exception.txt Logout on Jetty with Async True David Hubbard, 11/23/2011 08:56 PM

Also available in: Atom PDF