0

@global-command, how to set queueName when invoke globalCommand?

asked 2013-05-31 20:36:16 +0800

phdsong gravatar image phdsong
13 3

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);
delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2013-05-31 20:36:16 +0800

Seen: 37 times

Last updated: May 31 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More