PDA

View Full Version : [FIXED] [2.0 M1] Error centering modal dialog



jadrake75
14 May 2009, 9:18 PM
Window does appear centered, but kicks out an error.
Error is:


[FATAL] Uncaught Exception:

com.google.gwt.core.client.JavaScriptException:
(TypeError): '0' is null or not an object
number: -2146823281
description: '0' is null or not an object
at com.extjs.gxt.ui.client.core.El.getAlignToXY(Native Method)
at com.extjs.gxt.ui.client.widget.Window.center(Window.java:259)
at org.javad.client.stamp.components.forms.DefaultFormPanel.showDefaultsPanel(DefaultFormPanel.java:72)
at org.javad.client.stamp.components.TitleMenuView$2.handleEvent(TitleMenuView.java:97)


Source code of method:


publicstaticvoid showDefaultsPanel( ) {
Dialog d = Registry.get(DIALOG_REG);
if (d == null) {
d = new Dialog();
d.setLayout(new FitLayout());
final DefaultFormPanel formPanel = new DefaultFormPanel();
d.add(formPanel);
d.setButtons(Dialog.OKCANCEL);
d.getButtonById(Dialog.OK).addListener(Events.Select, new Listener<BaseEvent>() {
publicvoid handleEvent(BaseEvent be) {
formPanel.updateDefaults();
}
});
d.getButtonById(Dialog.CANCEL).addListener(Events.Select, new Listener<BaseEvent>() {
publicvoid handleEvent(BaseEvent be) {
Preferences.getInstance().reset();
}
});
d.setHeading(StampWebEditor.rbInfo.headerSelectDefaults());
d.setHideOnButtonClick(true);
d.setSize(450, 300);
d.setModal(true);
d.setShim(true);
d.setShadow(true);
Registry.register(DIALOG_REG, d);
}
d.show();
d.center();
/*El el = new El(d.getElement());
el.fadeIn(new FxConfig(500));
*/
}

sven
15 May 2009, 1:20 AM
Already fixed in SVN.