Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Cell Editors not showing up
Cell Editors not showing up [message #1823353] Wed, 25 March 2020 11:51 Go to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
Hello,

I created a simple example, which uses editors (checkbox) and painters(also checkbox)

all is working fine.
when i try to place this into my (way more complex) version of nattable in my application the painter gets shown, but the editor never shows up.

what can cause this?
I tried to debug this via EditController.editCell, but this seems to be never called.

i register a boolean editor like this:

	protected static void registerBooleanEditor(IConfigRegistry configRegistry, FieldInfo fi) {
		String COLUMN_LABEL = ColumnLabelAccumulator.COLUMN_LABEL_PREFIX + fi.getIndex();
		configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, new CheckBoxCellEditor(),
				DisplayMode.EDIT, COLUMN_LABEL);

configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, new CheckBoxPainter(),
				DisplayMode.NORMAL, COLUMN_LABEL);

configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER, new BooleanDisplayConverter(),
				DisplayMode.NORMAL, COLUMN_LABEL);

 }
	}


for testing i set a custom style which marks the columns with a red background. so i can be sure the correct labels are used.

result: red background with checkbox (if i do not register the CELL_PAINTER its text (true/false), but the editor does never show up (cell not activated?)

whats the best way to debug this?

EDIT:
i configured an EditingRule, which returns always true - for testing -
when i create the GridLayer with useDefaultConfiguration=true editors get shown up for unconfigured fields, but the CheckBox Editor is still not coming (and also not a text editor in this column)

[Updated on: Wed, 25 March 2020 12:08]

Report message to a moderator

Re: Cell Editors not showing up [message #1823355 is a reply to message #1823353] Wed, 25 March 2020 12:27 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 29
Registered: March 2020
Junior Member
There is no active CheckBoxCellEditor. It immediatelly switches the values and closes, and then the checkbox for the updated boolean value is shown.

If it is not working, probably your configuration is overriden by something. Hard to tell. But it sounds like some configuration for that column is incorrect, as for other columns the editor activation seems to work.

You need the DefaultEditBindings in place as described here: https://www.eclipse.org/nattable/documentation.php?page=editing

You could debug via the EditCellCommandHandler or the EditSelectionCommandHandler, dependent on how you want to activate the editor.

Re: Cell Editors not showing up [message #1823363 is a reply to message #1823355] Wed, 25 March 2020 14:54 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
Quote:
You could debug via the EditCellCommandHandler or the EditSelectionCommandHandler, dependent on how you want to activate the editor.

how can i decide how this is done?

does this mean editing a cell vs editing a selection=row?
Re: Cell Editors not showing up [message #1823369 is a reply to message #1823363] Wed, 25 March 2020 15:27 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 29
Registered: March 2020
Junior Member
no, it means activate an editor via mouse click or via key press (e.g. F2 or any other LetterOrDigit)
Previous Topic:NatTable 2.0 - dynamic scaling
Next Topic:NatTable 2.0 Release Plans
Goto Forum:
  


Current Time: Sun Jun 13 00:57:57 GMT 2021

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

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

Back to the top