Cell Editors not showing up [message #1823353] |
Wed, 25 March 2020 11:51 |
Ludwig Moser 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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03667 seconds