Toggle Handled Menu Item initialisation and persisted state [message #1599584] |
Tue, 03 February 2015 18:50 |
ALex W Messages: 56 Registered: July 2012 |
Member |
|
|
Hello all,
I'm working on a e4 application and I need to have a menu toggle button.
No issue to create it in my plugin fragment.e4xmi and have it display.
I do have the command and handler linked to it, with both @CanExecute and @Execute methods in the handler class.
The state of the toggle is linked to some boolean state in a OSGI Service and is changed in the execute method :
@Execute
public void execute( MHandledMenuItem menuItem, MyOSGIService osgiService){
osgiService.setStrictMode(menuItem.isSelected());
}
My question :
- How can I initialise the state of the button when the application starts ? By default, the toggle is unselected, no matter the state of the boolean in the service.
- Is it possible to have persisted states in the command/handler ? If so, how ? Using the @Persist annotation seems to be inefficient.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.02566 seconds