Skip to main content



      Home
Home » Eclipse Projects » NatTable » The ICellEditor is never triggered?
The ICellEditor is never triggered? [message #998633] Thu, 10 January 2013 06:47 Go to next message
Eclipse UserFriend
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 06:47] by Moderator

Re: The ICellEditor is never triggered? [message #998652 is a reply to message #998633] Thu, 10 January 2013 07:40 Go to previous messageGo to next message
Eclipse UserFriend
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 11:51 Go to previous messageGo to next message
Eclipse UserFriend
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 04:09 Go to previous message
Eclipse UserFriend
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 Jul 23 13:26:09 EDT 2025

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

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

Back to the top