Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » ComboBox value can't be selected
ComboBox value can't be selected [message #1692046] Sun, 12 April 2015 20:07 Go to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 225
Registered: July 2009
Senior Member
Hi all, I've several cells in my table where on of them is a Combobox
selection cell:

//register a combobox editor for values
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER,
new ComboBoxPainter(),
DisplayMode.NORMAL, MY_CELL_LABEL);
ComboBoxCellEditor myValueCombobox = new
ComboBoxCellEditor(myDAO.findAll());
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITOR,
myValueCombobox,
DisplayMode.EDIT, MY_CELL_LABEL);
configRegistry.registerConfigAttribute(
CellConfigAttributes.DISPLAY_CONVERTER,
new PercentageDisplayConverter(),
DisplayMode.NORMAL, MY_CELL_LABEL);

No, the cell is displayed with the correct value (percent in this case)
and a little arrow on the right side. But if I click on this arrow
nothing happens. I can edit all the other (text) cells in this row, but
I can't get out what's missing.
I've used the _447_EditorExample as example for this. Perhaps a layer is
missing or any other configuration? Any help would be appreciated.

Btw, where can I get the extension.builder package of NatTable? The
feature doesn't contain this classes, only the example jar contains them.

Regards,
Ralf.
Re: ComboBox value can't be selected [message #1692053 is a reply to message #1692046] Mon, 13 April 2015 04:22 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
Does the combo box open if you click in the text part of the combo? In that case it seems there is an issue with your edit configuration bindings. Did you modify that?

The other option is the edit rule configuration. Do you simply enable always or on special conditions?

I could also think of a conversion issue. I'm not sure about your dao and your data structure. Does it work if you remove the converter?

Regarding the builder, we do not support the builder, therefore it is not released. If you want to use it you have to check out the sources and hope it works with future releases since nobody maintains that extension.
Re: ComboBox value can't be selected [message #1692140 is a reply to message #1692053] Mon, 13 April 2015 20:45 Go to previous message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 225
Registered: July 2009
Senior Member
Am 13.04.2015 um 06:22 schrieb Dirk Fauth:
> Does the combo box open if you click in the text part of the combo? In
> that case it seems there is an issue with your edit configuration
> bindings. Did you modify that?
> The other option is the edit rule configuration. Do you simply enable
> always or on special conditions?
> I could also think of a conversion issue. I'm not sure about your dao
> and your data structure. Does it work if you remove the converter?
> Regarding the builder, we do not support the builder, therefore it is
> not released. If you want to use it you have to check out the sources
> and hope it works with future releases since nobody maintains that
> extension.

Hi Dirk,
thanks for your fast answer. I've checked my configuration and found the
mistake. The (missing) converter was one of the problem. The other one
was that I've missed the DisplayMode configuration for normal mode. Now
it works as expected. Here's the revised version:

//register a combobox editor for values
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITABLE_RULE,
IEditableRule.ALWAYS_EDITABLE,
DisplayMode.EDIT, MY_CELL_LABEL);
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER,
new ComboBoxPainter(),
DisplayMode.NORMAL, MY_CELL_LABEL);
MyValueComboProvider dataProvider = new
MyValueComboProvider(myDAO.findAll());
ComboBoxCellEditor myValueCombobox = new
ComboBoxCellEditor(dataProvider);
myValueCombobox.setFreeEdit(false);
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITOR,
myValueCombobox,
DisplayMode.NORMAL, MY_CELL_LABEL);
configRegistry.registerConfigAttribute(
CellConfigAttributes.DISPLAY_CONVERTER,
new MyValueDisplayConverter(),
DisplayMode.NORMAL, MY_CELL_LABEL);


Regards,
Ralf.
Previous Topic:Freezelayer issue
Next Topic:Nebula NatTable get all data and direct save existing or new record store to database/
Goto Forum:
  


Current Time: Fri Mar 05 05:29:37 GMT 2021

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

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

Back to the top