Hi,
This is the method that I'm using to show a PopupPanel.
--------------------------------------------------------
private PopupPanel loadingPopup = new PopupPanel(false, true);
this.loadingPopup.setWidget(getLoadingWidget());
private void showLoading(final Boolean loading)
{
if (loading)
{
this.addStyleName(waitCursorStyle);
this.loadingPopup.center();
//if table header is already displayed, show
//the loading message in the table.
if (ResultSetTable.this.loadingTop != 0)
{
this.loadingPopup.setPopupPosition(
this.loadingPopup.getPopupLeft(),
this.loadingTop);
}
}
else
{
this.removeStyleName(waitCursorStyle);
this.loadingPopup.hide();
}
}
--------------------------------------------------------
I use the following code to call it:
this.showLoading(true);
this.doStuff();
this.showLoading(false);
However, the loading box never actually shows up. But when I do the
following:
this.showLoading(true);
DeferredCommand.addCommand(new Command()
{
public void execute()
{
parentClass.this.doStuff();
parentClass.this.showLoading(false);
}
});
Everything works as expected. Does this mean that the setPopupPosition
() and Center() methods used deferred commands?
I'm at a loss as to why this happens...
S
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---