Focus handling in RAP different to RCP? [message #1762524] |
Thu, 11 May 2017 23:18  |
Eclipse User |
|
|
|
Hi,
we have a toolbar command whose active state is controlled via a handler in our RCP application like this:
<handler
commandId="au.net.synergy.wts.application.export_csv">
<class
class="au.net.synergy.wts.application.util.pdf.ExportCsvHandler">
</class>
<activeWhen>
<with
variable="activeFocusControl">
<instanceof
value="org.eclipse.nebula.widgets.grid.Grid">
</instanceof>
</with>
</activeWhen>
</handler>
So the command is active (enabled) when the activeFocusControl is a Grid. We do register the relevant Grid(s) via the IFocusService. This all works fine under RCP. However, under RAP it appears that clicking on the toolbar icon linked to this command changes the focus to the toolbar. Therefore the command becomes disabled the moment its clicked making it unusable.
Even if we remove this handler and have the command permanently active we have essentially the same problem. In the commands handler we look for the active focus control and we get the Toolbar in RAP while in RCP we get the Grid.
Thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04137 seconds