PDA

View Full Version : [FIXED] [BETA 2] Dialog action buttons not working



ceric35
30 Apr 2008, 1:33 AM
Hi,

Can see this bug in demo, Action buttons on dialog
are not working.

Adding event listener:

dialog.addListener(Events.Close, new Listener<WindowEvent>() { ...});
dialog.addListener(Events.BeforeClose, new Listener<WindowEvent>() { ...});doesn't fix the problem.

ceric35
5 May 2008, 6:28 AM
here is a sample code:


package test.client;

import com.extjs.gxt.ui.client.Events;
import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;

public class Test implements EntryPoint {

public void onModuleLoad() {
Dialog dialog = new Dialog();
dialog.setSize(475, 310);
dialog.setTitle("Test");

dialog.addListener(Events.BeforeClose, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
GWT.log("not called", null);
}
});

dialog.addListener(Events.Close, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
GWT.log("not called", null);
}
});
dialog.layout(true);
dialog.show();
}

}

darrellmeyer
13 May 2008, 9:46 AM
CloseAction is now moved to Window and is an enumeration which defaults to CLOSE. Clicking the close icon in the window header now consults the close action to determine what action to take. Your test code works as expected with these changes. Fix is in SVN.