|Selective editing / selective multi - editing [message #1489254]
||Thu, 27 November 2014 08:03
| Mikael Stolpe
Registered: March 2014
First of all I would like to express my gratitude for the NatTable framework. It is an delight to work with and gives some amazing results.
Now to my issue.
I have been doing some work on getting mutlti edit and select editing to work for our framework. Some things work well but when trying certain combination we run into trouble.
Having editing for all cells and multi edit for all cells regardless of config label works perfectly. However, this is not our use case.
We want to be able to configure which cells are editable and which cells are multi editable.
If we add rules which govern which are editable this also works fine, only the cells with the config labels specified can be edited. However using F2 to start edit command fails and multi edit is not possible to switch on.
The only way from what I can tell is to have edit and multi edit switched on for all cells.
I've been trying to figure out what might cause this behavior and from what I can tell single selection with click on cell triggers the
of the EditController class which use the cell from the input to retreive the config labels. In this situation the cell is first fetched from the command itself
public static void editCell(
final ILayerCell cell, final Composite parent,
Object initialCanonicalValue, final IConfigRegistry configRegistry)
However when using F2 it triggers
of the EditUtils which use the selectionlayer to first retrieve the cells and then the config lables.
public static boolean allCellsEditable(SelectionLayer selectionLayer, IConfigRegistry configRegistry)
In the first case the config labels are present, as are the name etc of the cell.
In the second case however the cells from the selectionlayer contain little to no information. Layer stack is either empty or simply contains the selectionAnchor whilst the name and such are null.
I'm a bit confused about this, perhaps I'm doing something wrong but from what I've understood from using this framework is that if the config labels are registered correctly in the first case it should be so in the second one as well.
I hope I've managed to describe the problem well enough but if there is anything unclear let me know and I'll clarify it.
Any idea or hint of what might cause this behavior? I'm hoping it's something I've missed but the more I work with this the more it feels like there is a bug somewhere.
Powered by FUDForum
. Page generated in 0.02163 seconds