Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » table row context menu when table is empty
table row context menu when table is empty [message #1349420] Mon, 12 May 2014 07:25 Go to next message
davide . is currently offline davide .
Messages: 12
Registered: March 2014
Junior Member
Hi all. Following the minicrm tutorial, I've added a context menu to the person table row (adding a subclass of AbstractExtensibleMenu to the subclass of AbstractExtensibleTable that implements the table) so that when I right click on a table row a context menu appears enabling the user to choose the "EDIT selected" person or adding a "NEW" person.
so far so good.
unfortunately, when the originating database table is empty, no row is displayed on the table, and right-clicking on the empty table does not show the context menu. This way I cannot add any new row to the table. Is there any way to overcome this situation?

Maybe is is possible to attache the context menu not to the table row, but to the originating table (maybe a different menu)?

Maybe I can add an item to the main menu, spawnig a new person form, but in this case how to be aware of the fact that maybe there's a person table shown that needs to be notified that the user added person information, pressed the ok button in the new person form to store the new database row?

thanks in advance!
Re: table row context menu when table is empty [message #1349429 is a reply to message #1349420] Mon, 12 May 2014 07:31 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias Nick
Messages: 183
Registered: August 2013
Senior Member
Hi d dr,

can you try to override the following method in your menu:

@Override
protected boolean getConfiguredEmptySpaceAction() {
 return true;
}


this should enable the menu even if you have no content in the table.

Best regards,
Matthias
Re: table row context menu when table is empty [message #1349720 is a reply to message #1349429] Mon, 12 May 2014 10:13 Go to previous message
davide . is currently offline davide .
Messages: 12
Registered: March 2014
Junior Member
Great! Thanks Matthias, works perfectly well
Previous Topic:RAP an Firefox 29
Next Topic:application configuration management
Goto Forum:
  


Current Time: Wed Oct 22 12:25:28 GMT 2014

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

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