The idea is simular to the feature of ZK 8 provided that developer can use client side API to trigger a command to MVVM ViewModel. In this feature we would like to have a client side API to trigger a command to ZK Composer.
For example,
public class MyComposer extends SelectorComposer<Window> { public void doAfterCompose(Window comp) throws Exception { super.doAfterCompose(comp); } public static class MyFoo { private String foo; public void setFoo(String foo) { this.foo = foo;} public String getFoo() { return this.foo;} } public static class MyBar { // omitted } @Command public void clientCommand(MyFoo foo, MyBar bar) { } }
In JS
zkservice.$('$win').command('clientCommand', [{foo: "myfoo"}, {bar: "mybar"}]); // the arguments should be in order within an array.