Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Issue with combobox Editor
Issue with combobox Editor [message #1696153] Fri, 22 May 2015 12:03 Go to next message
Ravikiran Bhonagiri is currently offline Ravikiran BhonagiriFriend
Messages: 1
Registered: May 2015
Junior Member
Hi Experts,

Going to my issue I have created a NatTable, which has combo box defined for one column. Here is the code for the combo box editor in my edit configuration file

ComboBoxCellEditor comboBoxCellEditor = new ComboBoxCellEditor(Arrays.asList("Yes", "No"), -1); // combo box only takes only yes or no...!

configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITABLE_RULE,
new ColumnEditableRule(this.bodyDataProvider),
DisplayMode.EDIT,
COLUMN_LABEL);

// register a combo box
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITOR,
comboBoxCellEditor,
DisplayMode.EDIT,
COLUMN_LABEL);

// enables drop down arrow icon in the column
configRegistry.registerConfigAttribute( CellConfigAttributes.CELL_PAINTER,
new ComboBoxPainter(),
DisplayMode.NORMAL,
COLUMN_LABEL);

When I see the generated Nattable GUI.
I can see the "down arrow" symbol coming up for that particular column,
When I try to click that "down arrow" in order to see the drop down, it is giving a crash.

The stack trace for it :

SEVERE: Error while editing cell: Cell: org.eclipse.nebula.widgets.nattable.layer.cell.TranslatedLayerCell@48bc8875; Initial value: Yes
java.lang.NullPointerException
at org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor.fillCombo(ComboBoxCellEditor.java:341)
at org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor.activateCell(ComboBoxCellEditor.java:206)
at org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor.activateCell(AbstractCellEditor.java:168)
at org.eclipse.nebula.widgets.nattable.edit.EditController.editCell(EditController.java:99)
at org.eclipse.nebula.widgets.nattable.edit.command.EditCellCommandHandler.doCommand(EditCellCommandHandler.java:49)
at org.eclipse.nebula.widgets.nattable.edit.command.EditCellCommandHandler.doCommand(EditCellCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler.doCommand(AbstractLayerCommandHandler.java:21)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:178)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.doCommand(CompositeLayer.java:131)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommand(GridLayer.java:187)
at org.eclipse.nebula.widgets.nattable.NatTable.doCommand(NatTable.java:739)
at org.eclipse.nebula.widgets.nattable.edit.action.MouseEditAction.run(MouseEditAction.java:31)
at org.eclipse.nebula.widgets.nattable.ui.mode.MouseModeEventHandler.executeClickAction(MouseModeEventHandler.java:182)
at org.eclipse.nebula.widgets.nattable.ui.mode.MouseModeEventHandler.mouseUp(MouseModeEventHandler.java:79)
at org.eclipse.nebula.widgets.nattable.ui.mode.ModeSupport.mouseUp(ModeSupport.java:105)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.qualcomm.qti.qsip.rcp.Application.start(Application.java:127)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

I tried many options, but did not get a working solution.

hope I will get it here...!

Thanks and Regards
Ravikiran Bhonagiri
Re: Issue with combobox Editor [message #1696172 is a reply to message #1696153] Fri, 22 May 2015 14:24 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2809
Registered: July 2012
Senior Member
Looks like you haven't registered an IDisplayConverter. Are you using the DefaultNatTableStyleConfiguration where the DefaultDisplayConverter is registered in general?
Previous Topic:DefaultGlazedListsStaticFilterStrategy.removeStaticFilter does not remove matcher in underlying set
Next Topic:Sort problem in TreeFormat
Goto Forum:
  


Current Time: Tue Apr 20 14:51:06 GMT 2021

Powered by FUDForum. Page generated in 0.02133 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top