Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Enable/Disable a Menu Element in a Processor(Is it possible to enable/disable a menu command label in a Processor)
Enable/Disable a Menu Element in a Processor [message #756495] Mon, 14 November 2011 02:42 Go to next message
St Clair Clarke is currently offline St Clair ClarkeFriend
Messages: 118
Registered: March 2010
Senior Member

I am learning how to use an E4AP Processor with the two tutorials:

I have an Admin menu command that I would like to enable/disable if someone logs onto the database, but IS NOT authenticated as an admin role.

I know how to make the Admin command label visible/invisible, BUT I would rather disable/enable it instead.

There is no such mechanism in any of the *Element classes I have seen in E4AP.

How can I do this?

If such a enable/disable and element does not exist, would it be possible for the team to implement one?

Re: Enable/Disable a Menu Element in a Processor [message #756640 is a reply to message #756495] Mon, 14 November 2011 14:49 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Your handler should implement a @CanExecute method that could check if the user is logged in and has the admin role. You would probably want to have that information cached in a manager, so the @CanExecute check is quick and the manager deals with the database.


Previous Topic:Are draw2d objects turned into modeled objects?
Next Topic:Starting birt from e4 application
Goto Forum:

Current Time: Mon May 28 03:36:17 GMT 2018

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

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

Back to the top