Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » IColumnAccessor.setDataValue is called twice
IColumnAccessor.setDataValue is called twice [message #1760423] Thu, 27 April 2017 04:54 Go to next message
Saranya Rathinam is currently offline Saranya RathinamFriend
Messages: 2
Registered: April 2017
Junior Member
Using NatTable (v1.3.0.201503261201)

DSL language file information will be displayed in Nattable. If the DSL file is read-only then pop-up will open and asks user decision that whether do you need to modify the file permission. If the user presses 'yes' then row will be modified and the corresponding DSL file will be updated.

But Double times the pop-up window opens and asks user decision to modify the file when i change something in the Nattable.

Analysis:
As per my analysis IColumnAccessor.setDataValue is calling twice for any modification in the row cells:

whenthe ENTER key is pressed - Stacktrace
TextCellEditor(AbstractCellEditor).commit(SelectionLayer$MoveDirectionEnum, boolean) line: 331
TextCellEditor(AbstractCellEditor).commit(SelectionLayer$MoveDirectionEnum) line: 326
TextCellEditor$1.keyPressed(KeyEvent) line: 246

because the TextCellEditor loses focus - Stacktrace
TextCellEditor(AbstractCellEditor).commit(SelectionLayer$MoveDirectionEnum, boolean, boolean) line: 341
TextCellEditor(AbstractCellEditor).commit(SelectionLayer$MoveDirectionEnum, boolean) line: 331
AbstractCellEditor$InlineFocusListener.focusLost(FocusEvent) line: 462

how can I Confused solve this problem?.
Re: IColumnAccessor.setDataValue is called twice [message #1760512 is a reply to message #1760423] Thu, 27 April 2017 20:00 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Do you see the same behaviour with NatTable 1.5?
Re: IColumnAccessor.setDataValue is called twice [message #1760523 is a reply to message #1760512] Fri, 28 April 2017 04:06 Go to previous messageGo to next message
Saranya Rathinam is currently offline Saranya RathinamFriend
Messages: 2
Registered: April 2017
Junior Member
Hi Dirk,

Thanks for your reply.

I am very new to this topic and we are using 1.3 version in our application so I have no idea about 1.5 version.
Re: IColumnAccessor.setDataValue is called twice [message #1760529 is a reply to message #1760523] Fri, 28 April 2017 06:33 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Well I don't know what you have done to open a dialog on commit. But I suppose you try to commit, then you notice that you need to open a dialog, this causes the text control to loose focus to the dialog, and loosing the focus is causing a commit.

Typically you should use the DialogErrorHandling as error strategy for validation and conversion errors if you want to inform the user about the error and request an action. Probably you need to customize the default DialogErrorHandling for your use case. This is shown in the _4451_CrossValidationGridExample in NatTable Examples -> Tutorial Examples -> Configuration -> Editing -> CrossValidationExample
Previous Topic:RichTextPainter and Alignment question
Next Topic:Loading Nattable state takes a lot of time.
Goto Forum:
  


Current Time: Fri Apr 26 19:52:15 GMT 2024

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

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

Back to the top