Paul Webster Messages: 6859 Registered: July 2009 Location: Ottawa
On 04/08/2011 02:12 AM, AppleJus wrote:
> Hello again,
> I can disable a direct tool menuitem using:
> EModelService uielementService = context.get(EModelService.class);
> MDirectToolItem Button = (MDirectToolItem) uielementService.find("eID",
> I was trying to do the same for a corresponding button in the menu , a
> MDirectMenuItem, but it does not work..
MDirectMenuItem should be calling your @CanExecute method, is it not?
That's probably it, actually, since not providing a @CanExecute implies
canExecute == true.
The ToolItem pattern needs to be updated so it is invoking @CanExecute