|Re: Active Perspective Core Expression [message #1221291 is a reply to message #1221040]
||Tue, 17 December 2013 10:19
| Ozgur Cagdas
Registered: May 2013
Thanks very much for the direction. However, let's say for Handled Popup Menu Items, if we use @CanExecute rather than Visible-When, this just grays out the menu item instead of totally hiding it. So, I think we cannot achieve the exactly same behaviour.
Also, using @CanExecute means handling this at the command handler level, however, where the required functionality is modifying the visibility of the menu item, this should be handled at a central location regardless of individual handlers I think. So, this is where we need Visible-When. However, I appreciate why you are in favour of POJOs and DI as opposed to using core expressions, so maybe we need a new mechanism to be able to accommodate POJOs as Visible-When handlers. Does that make sense? Either an existing annotation like @CanExecute can be used or a new one (i.e. @IsVisible) can be appointed for this purpose.
I personally feel that current Core Expression definition mechanism is a bit lengthy anyway, so, replacing this with (or extending to) POJOs for Visible-When can also simplify the process.
Powered by FUDForum
. Page generated in 0.05125 seconds