Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2822

Provide a channel to communicate between client and server with ZK composer

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 8.0.0
    • 8.0.0
    • Container
    • None
    • ZK 8.0.1

      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.
      

            jumperchen jumperchen
            jumperchen jumperchen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h