andrey
20 Jun 2008, 10:04 AM
Took me a long time to isolate this problem, but I think I've found it. My apologies that my JS/CSS skills are not good enough to debug it past isolating it down to some demonstrable code.
Using the test code below, do the following:
Push the button so that the MessageBox.alert() shows up
Dismiss the message box
Try resizing the columns by dragging on the splitter between the column headingsWith the beta4 gxt.jar, the column resize will work. However, with the beta5 and rc1 gxt.jar, the column splitter bar separates from the column heading splitter and gets confused (try it).
import java.util.ArrayList;
import java.util.List;
import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
import com.extjs.gxt.ui.client.widget.button.ToggleButton;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.table.Table;
import com.extjs.gxt.ui.client.widget.table.TableColumn;
import com.extjs.gxt.ui.client.widget.table.TableColumnModel;
import com.extjs.gxt.ui.client.widget.table.TableItem;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
public class TestColumnResizeAfterAlert implements EntryPoint {
public void onModuleLoad() {
ContentPanel mainPanel = new ContentPanel();
ButtonBar dummyBar = new ButtonBar();
ToggleButton dummy = new ToggleButton("Show Alert");
dummy.addSelectionListener(new SelectionListener<ComponentEvent>() {
public void componentSelected(ComponentEvent ce) {
MessageBox.alert("Alert", "Now try re-sizing the table columns", null);
}
});
dummyBar.add(dummy);
mainPanel.add(dummyBar);
List<TableColumn> columns = new ArrayList<TableColumn>();
TableColumn column = new TableColumn("Col1", 100);
columns.add(column);
TableColumn column2 = new TableColumn("Col2", 200);
columns.add(column2);
TableColumnModel cm = new TableColumnModel(columns);
Table table = new Table(cm);
for(int i = 0; i < 3; ++i) {
Object[] values = { "c1." + i, "c2." + i };
table.add(new TableItem(values));
}
mainPanel.add(table);
Viewport vp = new Viewport();
vp.setLayout(new FitLayout());
vp.add(mainPanel);
RootPanel.get().add(vp);
}
}
A screenshot showing the splitter bar in this funky mode is attached.
Thanks,
Andre
Using the test code below, do the following:
Push the button so that the MessageBox.alert() shows up
Dismiss the message box
Try resizing the columns by dragging on the splitter between the column headingsWith the beta4 gxt.jar, the column resize will work. However, with the beta5 and rc1 gxt.jar, the column splitter bar separates from the column heading splitter and gets confused (try it).
import java.util.ArrayList;
import java.util.List;
import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
import com.extjs.gxt.ui.client.widget.button.ToggleButton;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.table.Table;
import com.extjs.gxt.ui.client.widget.table.TableColumn;
import com.extjs.gxt.ui.client.widget.table.TableColumnModel;
import com.extjs.gxt.ui.client.widget.table.TableItem;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
public class TestColumnResizeAfterAlert implements EntryPoint {
public void onModuleLoad() {
ContentPanel mainPanel = new ContentPanel();
ButtonBar dummyBar = new ButtonBar();
ToggleButton dummy = new ToggleButton("Show Alert");
dummy.addSelectionListener(new SelectionListener<ComponentEvent>() {
public void componentSelected(ComponentEvent ce) {
MessageBox.alert("Alert", "Now try re-sizing the table columns", null);
}
});
dummyBar.add(dummy);
mainPanel.add(dummyBar);
List<TableColumn> columns = new ArrayList<TableColumn>();
TableColumn column = new TableColumn("Col1", 100);
columns.add(column);
TableColumn column2 = new TableColumn("Col2", 200);
columns.add(column2);
TableColumnModel cm = new TableColumnModel(columns);
Table table = new Table(cm);
for(int i = 0; i < 3; ++i) {
Object[] values = { "c1." + i, "c2." + i };
table.add(new TableItem(values));
}
mainPanel.add(table);
Viewport vp = new Viewport();
vp.setLayout(new FitLayout());
vp.add(mainPanel);
RootPanel.get().add(vp);
}
}
A screenshot showing the splitter bar in this funky mode is attached.
Thanks,
Andre