PDA

View Full Version : [FIXED] [2.0 Trunk]: column.setHidden(true) is ignored when rendering a grid



mgoerdes
27 May 2009, 1:33 AM
Hi Dev-Team,

after synchronizing the current trunk this morning (rev 1492) the column.setHidden(true); is ignored while opening a grid. The gridheader displays also the hidden columns. The content is displayed correctly.

You can test this issue when modifying the GridExample from the explorer and add the line column.setHidden(true); after line 62. After that the header of the "Company" column remain displayed.

Miggins
3 Jun 2009, 10:40 AM
+1 for this.

mgoerdes
6 Jun 2009, 4:43 AM
This originally posted error is solved with Rev. 1507. Unfortunately I get the following error in the same testcase, when I want to open the context-menu for the last column.

java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.extjs.gxt.ui.client.widget.grid.ColumnHeader.onDropDownClick(ColumnHeader.java:590)
at com.extjs.gxt.ui.client.widget.grid.ColumnHeader$Head.onClick(ColumnHeader.java:299)
at com.extjs.gxt.ui.client.widget.grid.ColumnHeader$Head.onComponentEvent(ColumnHeader.java:238)
at com.extjs.gxt.ui.client.widget.Component.onBrowserEvent(Component.java:756)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1320)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:1299)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1262)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

sven
6 Jun 2009, 5:17 AM
That works fine for me. Can you please post some testcase that is demonstrating this issue? I also dont have this on the examples.

mgoerdes
6 Jun 2009, 5:25 AM
As on the original problem you can test this when modifying "Basic-Grid" Example (com.extjs.gxt.samples.client.examples.grid.GridExample) from the explorer and add the line column.setHidden(true); after line 62. Now "Company" is not shown, but if you try to open the context-menu of the last column ("Last Updated") the mentioned error occurs.

mgoerdes
6 Jun 2009, 5:29 AM
Its the same behaviour as on

http://extjs.com/examples-dev/explorer.html#basicgrid

if you hide "Company" and then open the context-menu of "Symbol" the context-menu of "Last" is opened.

sven
6 Jun 2009, 6:22 AM
Ok, thanks for reporting that. We changed the Header a lot to support a few (better a lot) more features.

sven
6 Jun 2009, 6:29 AM
Fixed in SVN