PDA

View Full Version : using Dialog.setHeaderVisible(false) causes app to not start (in prod mode)



nbuesing
15 Feb 2012, 6:16 AM
If you have dialog.setHeaderVisible(false) in your code, it will compile into javascript that will cause the application to not start.

If your code has 'dialog.setHeader(false)' in the code (and you don't have to display the dialog), you will get the following javascript error when you try to run your application in production mode.


'visMode' is null or not an object

And the application will not display (in the provided example, "Hello World" will not appear on the screen).

Again, this is only in production mode, this bug cannot be reproduced in development mode:


http://127.0.0.1:8888/Examples.html does not work.
http://127.0.0.1:8888/Examples.html?gwt.codesvr=127.0.0.1:9999 does work.



Here is my Entry Point, I have zipped up my .gwt.xml, class, and src folder structure as well.



package com.buesing.gwt.client.widget;


import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.sencha.gxt.widget.core.client.Dialog;
import com.sencha.gxt.widget.core.client.container.Viewport;


public class DialogHeaderHiding implements EntryPoint {




private Dialog dialog = new Dialog();

private Widget asWidget() {

// comment this line out, application works in production mode.

dialog.setHeaderVisible(false);

return new HTML("Hello World!");
}




public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.add(asWidget());
RootPanel.get().add(viewport);
}
}


31725

WesleyMoy
15 Feb 2012, 8:26 PM
I'm not noticing the problem you're describing when I test it against Beta 3. If you're still having this problem with Beta 3, what browser and OS are you using?

nbuesing
16 Feb 2012, 5:12 AM
I was unaware that beta3 came out on Tuesday. I will download and retest.