-
FEATURED COMPONENTS
First time here? Check out the FAQ!
From my zul, I set binder to set specific queueName for globalCommand as below:
<div apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('mvvm.product.ProductViewModel')"
binder="@init(queueName='Product', queueScope='desktop')">
From other ViewModel, I can call globalCommand with BindUtils which sets queueName and queueScope.
Map<String, Object> args = new HashMap<String, Object>();
args.put("queueMessage", message);
BindUtils.postGlobalCommand("Product", EventQueues.DESKTOP, "openEditor", args);
However, it looks I can not specify queueName when I use @global-command('name') as below:
<tab tooltiptext="Manage Products" id="tabProducts" label="Products" onSelect="@global-command('listProducts')" />
The above @global-command is basically working as
BindUtils.postGlobalCommand(null, null, "listProducts", null);
Asked: 2013-05-31 20:36:16 +0800
Seen: 37 times
Last updated: May 31 '13