Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Selective editing / selective multi - editing(Activating editing or multi editing for cells with certain config labels fails.)
Selective editing / selective multi - editing [message #1489254] Thu, 27 November 2014 08:03 Go to next message
Mikael Stolpe is currently offline Mikael StolpeFriend
Messages: 7
Registered: March 2014
Junior Member
Greetings,

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
	public static void editCell(
			final ILayerCell cell, final Composite parent, 
			Object initialCanonicalValue, final IConfigRegistry configRegistry)
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

However when using F2 it triggers
public static boolean allCellsEditable(SelectionLayer selectionLayer, IConfigRegistry configRegistry)
of the EditUtils which use the selectionlayer to first retrieve the cells and then the config lables.

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.


With Regards,
Mikael Stolpe
Re: Selective editing / selective multi - editing [message #1489708 is a reply to message #1489254] Thu, 27 November 2014 16:07 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
At which layer do you add your labels to the label stack? Typically the best place is to do this at DataLayer level. If you are adding it on a layer on top of the SelectionLayer (which sounds to me that it is the issue) at SelectionLayer the labels are not added yet.

Note that adding labels at DataLayer level is typically the best approach because you don't have to deal with position-index transformations.
Re: Selective editing / selective multi - editing [message #1490510 is a reply to message #1489708] Fri, 28 November 2014 07:45 Go to previous messageGo to next message
Mikael Stolpe is currently offline Mikael StolpeFriend
Messages: 7
Registered: March 2014
Junior Member
Thank you for the quick and informative reply. I'll look into it asap and let you know if it solved the problem

With Regards
Mikael
Re: Selective editing / selective multi - editing [message #1561604 is a reply to message #1490510] Tue, 13 January 2015 07:28 Go to previous message
Mikael Stolpe is currently offline Mikael StolpeFriend
Messages: 7
Registered: March 2014
Junior Member
I haven't had a chance to work on this until last week and I just wanted to post and let you know that this did indeed solve the problem. It was right on the money and after the changes it works perfectly.

Thanks again and I apologize for the delay with the feedback.

With Regards
Mikael
Previous Topic:different Colors in one Cell
Next Topic:NatTable listens to Project deletion in RCP
Goto Forum:
  


Current Time: Thu Apr 25 12:13:26 GMT 2024

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

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

Back to the top