Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Save with F10
Save with F10 [message #1732572] Wed, 18 May 2016 10:28
Rashmi Tr is currently offline Rashmi TrFriend
Messages: 22
Registered: November 2011
Junior Member
I have Editors in Nattable. In Editor after editing i need to press F10 Key to save the values in Database.

So in EditBinding i added this:

uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.F10),new KeySaveAction());

And I created the class KeySaveAction which implements IKeyAction (like KeyEditAction Class).In which I added the

Command EditSaveCommand which extends AbstractContextFreeCommand and for that created EditSaveCommandHandler

which extends AbstractLayerCommandHandler<EditSaveCommand> and Overrided doCommand(EditSaveCommand command) from

EditSaveCommandHandler.

natTable.doCommand(new EditSaveCommand(natTable, natTable.getConfigRegistry(), convertCharToCharacterObject(event)));

But it is doing nothing. What I am missing and what should I do to make it work?

Thanks and Regards,
Rashmi
Re: Save with F10 [message #1732576 is a reply to message #1732572] Wed, 18 May 2016 03:58 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Try to debug what is not executed. How should I tell you from your explanation what is missing? It sounds all ok so far. Maybe you missed to add the UiBindingConfiguration or it breaks somewhere in between.

Put a breakpoint in your IKeyAction to see if it gets triggered.
Is your AbstractLayerCommandHandler registered to any layer? If not, what should happen?
Previous Topic:Color of the text in the cell changes while scrolling the table
Next Topic:fresh installed, did nothing, immediately this
Goto Forum:
  


Current Time: Fri Apr 26 21:31:57 GMT 2024

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

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

Back to the top