PDA

View Full Version : [FIXED] MessageBox goes behind Window



valavanurman
15 Mar 2009, 10:12 AM
I'm using the Window class for popup.

Problem 1: The GWT Listbox underneath the window is shown through the GXT window.

Problem 2: Upon validating the contents of the window, I use MessageBox to show error. This goes under the Window.

Is there any advantage of using Popup class instead of Windows. When do you use which one.

Please help!

sven
15 Mar 2009, 3:52 PM
For your first problem please the the response of your help forum topic. For your second problem please post a testcase demonstrating the issue. Please see also for the bug forum guidelines.

valavanurman
15 Mar 2009, 6:48 PM
Good to know Zindex would solve the Window going behind. But can you help me with the css entry for Window? The css is part of the gxt.jar. I would appreciate if you can elaborate on making the zindex entry....


Here is the sample code that would simulate the problem.


package com.mycompany.project.client;


import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

import com.google.gwt.user.client.ui.Widget;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.Popup;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.Window;

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/

public class ImageViewer implements EntryPoint {
private Button clickMeButton;

public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
Button clickMe1 = new Button("Get First Popup");
clickMe1.addClickListener(new ClickListener() {
public void onClick(Widget w) {
showPopup1();
}
});
Viewport basePnl = new Viewport();
basePnl.add(clickMe1);
rootPanel.add(basePnl);
}

public void showPopup1() {
final Window win = new Window();
VerticalPanel vp = new VerticalPanel();

Button clickMe = new Button("Click Me");
clickMe.addClickListener(new ClickListener() {
public void onClick(Widget w) {
MessageBox mb = new MessageBox();
mb.setTitle("WIN2");
mb.setMessage("TESTING SECOND POPUP");
mb.setIcon(MessageBox.INFO);
mb.setButtons(MessageBox.OK);
mb.show();
}
});
ListBox lb = new ListBox();
lb.addItem("You would see me through popup");
vp.add(lb);
ListBox lb2 = new ListBox();
lb2.addItem("You would see me too through popup");
vp.add(lb2);
ListBox lb3 = new ListBox();
lb3.addItem("You would see me too through popup");
vp.add(lb3);
vp.add(clickMe);

win.setWidth(340);
win.setHeight(230);
ContentPanel cp = new ContentPanel();
cp.setHeading("win1 heading");
cp.add(vp);
win.add(cp);
win.layout();
win.show();
win.center();
}
}

sven
16 Mar 2009, 6:23 AM
For me the messagebox isnt shown under the window. With which browser do you have this issue?

valavanurman
16 Mar 2009, 7:41 AM
I use IE6.0 for testing this.

The problem appears in hosted mode also. I'm attaching the screen print for your reference.

Thanks

sven
16 Mar 2009, 7:45 AM
Are you sure that you use the latest gxt css resources?

valavanurman
16 Mar 2009, 8:06 AM
I use gxt1.2.2

valavanurman
16 Mar 2009, 8:11 AM
Interestingly, if I use Popup instead of Window, the messagebox stay on top.....

sven
16 Mar 2009, 8:24 AM
I found the issue.

valavanurman
16 Mar 2009, 9:27 AM
Thanks.

Can you please suggest a workaround in 1.2.2.

We are having other issues with upgrading to 1.2.3....

valavanurman
17 Mar 2009, 7:38 PM
The problem happens only in IE6. IE7 seems to be ok.

Almost all our users are in IE6 and we're close to production rollout with GXT1.2.2. Would appreciate if you can suggest a workaround with 1.2.2.

Thanks

sven
18 Mar 2009, 3:40 AM
Yes it is ie6 only. It is an issue with the shim. There is no easy workaround for that.

valavanurman
5 Apr 2009, 9:28 AM
Can you please confirm if the fix for this is going into the next release?

We're nearing production and would dearly like to have this fix, particularly as there is no workaround....

Thanks

sven
5 Apr 2009, 1:13 PM
It is already fixed in SVN and will go live with 1.2.4 and 2.0