PDA

View Full Version : [FNR] column selection submenu in grid header disappears when scrolling



marc76
13 Oct 2010, 4:02 AM
Hi all,

I think a found a bug: when scrolling vertically at least a bit in the browser window, you can not use the column selection submenu of a grid column header anymore, it just disappears when the mouse comes over it. For reproducing just use the following code, make the browser window small enough so that you can scroll down a bit (scrolling away the panel header is enough), and try to (de-)select columns in the menu..

My system: Win XP SP3, GWT 2.1.0RC1, GXT 2.2.0, Firefox 3.5.10/Chrome dev 7.0.517, both hosted and web mode.

I think the bug is in MenuItem.shouldDeactivate(), where probably some y-coordinate is not correctly detected.

Here the code:



public class Test implements EntryPoint {

public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
LayoutContainer cont = new GridExample();
rootPanel.add(cont);
}

class GridExample extends LayoutContainer {

private ColumnModel cm;

@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setLayout(new FlowLayout(10));
getAriaSupport().setPresentation(true);

List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

ColumnConfig column = new ColumnConfig();
column.setId("name");
column.setHeader("Company");
column.setWidth(200);
column.setRowHeader(true);
configs.add(column);

column = new ColumnConfig();
column.setId("symbol");
column.setHeader("Symbol");
column.setWidth(100);
configs.add(column);

ListStore<Stock> store = new ListStore<Stock>();
store.add(TestData.getStocks());

cm = new ColumnModel(configs);

ContentPanel cp = new ContentPanel();
cp.setBodyBorder(true);
cp.setHeading("Basic Grid");
cp.setButtonAlign(HorizontalAlignment.CENTER);
cp.setLayout(new FitLayout());
cp.getHeader().setIconAltText("Grid Icon");
cp.setSize(300, 300);

final Grid<Stock> grid = new Grid<Stock>(store, cm);
grid.setAutoExpandColumn("name");
grid.setBorders(false);
grid.setStripeRows(true);
grid.setColumnLines(true);
grid.setColumnReordering(true);
cp.add(grid);

add(cp);
}

}

class Stock extends BaseModelData {}

static class TestData {

public static List<Stock> getStocks() {

List<Stock> stockList = new ArrayList<Stock>();
Stock stock1 = new TestWebApp().new Stock();
stock1.set("name", "name");
stock1.set("symbol", "symbol");
stock1.set("date", new Date());
stockList.add(stock1);

return stockList;
}

}
}


Kind regards,

Marc

sven
13 Oct 2010, 7:01 AM
Fixed in SVN as of revision 2260

marc76
14 Oct 2010, 4:48 AM
Thanks! I saw somewhere in this forum that a release 2.2.1. is planned. Is there an (estimated) release date, too? At least it is not mentioned on the roadmap.

sven
14 Oct 2010, 4:49 AM
We plan to release it on monday.

marc76
14 Oct 2010, 5:00 AM
great, thanks!

jcotter
28 Oct 2010, 12:58 PM
What is current status on 2.2.1 release and where can it be obtained. Thanks!

sven
28 Oct 2010, 2:56 PM
It was not released yet. There is a small delay.

jcotter
13 Nov 2010, 3:59 PM
I have installed the 2.2.1 release and still see a similar problem - After vertical scrolling as described above, the column submenu deactivates before being able to make a column selection. Browser is Firefox 3.6.7.

Did the fix from this thread make it into the release (issue #)?

Could you describe the fix or where the issue might be coming from so I might also investigate more closely?

Thanks!