Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Nattable saveState and loadState issue
Nattable saveState and loadState issue [message #1818629] Fri, 20 December 2019 18:45 Go to next message
Ludwig Moser is currently offline Ludwig MoserFriend
Messages: 476
Registered: July 2009
Senior Member
i ran into problems when storing settings for nattable

Description of my problem:

as far as i understand NatTable stores configs with index of the column as key.
this does not work for me as its possible that those indexes change with updates for my application (added fields - see below)

this is nattable specific and ok -> i need to write my own saveState.

how does nattable store the width of a column (its not in the properties file - is it?) i was not able to find this in the saveState - properties (did i miss it? and its there?)

further

when i change the config of the table (add columns -> indizes change) so the config is corrupted - wrong columns pop up, reordering is corrupt or nothing gets shown up at all (as mentioned above - this is no blame on nattable - as i do change the column count!)

finally to come to my question:

how can i get and get the width for columns?

EDIT: is it this: BODY.NONFROZEN_REGION.columnWidth.sizes=902\:38,928\:335,
column#902=38, only non defaults are saved?

how can i get and set the width for columns?
is there a command for setting multiple/all widths?

EDIT: so the simplest way would be patching the "properties"

[Updated on: Fri, 20 December 2019 18:49]

Report message to a moderator

Re: Nattable saveState and loadState issue [message #1818637 is a reply to message #1818629] Fri, 20 December 2019 22:29 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
The column widths are stored in the SizeConfig inside the DataLayer. There is API in the DataLayer to modify the dimensions. And there are also resize commands, e.g. the MultiColumnResizeCommand (hope the name is correct).

Yes I think the defaults are not saved for every column. Only if it is resized it needs to be stored. For the details in names etc. you should check the sources of SizeConfig and DataLayer. And yes, if you modify the underlying data structure so the stored state does not match anymore, you need to patch the properties.
Previous Topic:"Widget is disposed" from NatTable.handleLayerEvent()
Next Topic:how to create a custom filter
Goto Forum:
  


Current Time: Fri Apr 19 12:53:22 GMT 2024

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

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

Back to the top