Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » The ICellEditor is never triggered?
The ICellEditor is never triggered? [message #998633] Thu, 10 January 2013 11:47 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
I created an ICellEditor and registered it as following:

configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "LABEL1");

configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, new Table_CellEditor(), DisplayMode.EDIT, "LABEL1");


When using the TextCellEditor instead of Table_CellEditor - it works.
But none of the methods inside the Table_CellEditor is triggered.

What could be the reason?

[Updated on: Thu, 10 January 2013 11:47]

Report message to a moderator

Re: The ICellEditor is never triggered? [message #998652 is a reply to message #998633] Thu, 10 January 2013 12:40 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
You need to register your custom Table_CellEditor to the NatTable like this in an AbstractUiBindingConfiguration:

uiBindingRegistry.registerFirstSingleClickBinding(
	new BodyCellEditorMouseEventMatcher(Table_CellEditor.class),
	new MouseEditAction());
		
uiBindingRegistry.registerFirstMouseDragMode(
	new BodyCellEditorMouseEventMatcher(Table_CellEditor.class),
	new CellEditDragMode());


This is done e.g. in the DefaultEditBindings which are registered in the DefaultGridLayerConfiguration for the default editors of the NatTable.
Re: The ICellEditor is never triggered? [message #998765 is a reply to message #998652] Thu, 10 January 2013 16:51 Go to previous messageGo to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
Thnx Dirk, and happy new year Smile
Re: The ICellEditor is never triggered? [message #1005899 is a reply to message #998765] Tue, 29 January 2013 09:09 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
With the current refactoring of editing in NatTable, the BodyCellEditorMouseEventMatcher is deprecated, replaced with the CellEditorMouseEventMatcher. The first one checked if an editor is registered and if it is of the specified type. The new one only checks if an editor is registered. This has the advantage that you do not have to register a matcher for every cell editor you are adding. For editors that should not be activated if you click at any position of a cell (e.g. CheckboxCellEditor), you still need to register a special matcher.
Previous Topic:Fill columnwise
Next Topic:NatTable Developing
Goto Forum:
  


Current Time: Wed Apr 24 18:09:54 GMT 2024

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

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

Back to the top