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

Enhance simplified MVVM syntax

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 10.0.0
    • 9.5.0
    • None
    • None

      User Story

      1. the simplified "@" should imply @load, @save, @bind, and @command

      2. @command and @ should be the same usage for positional and named parameter

      3. the command parameter should not be confusing, @bindparam and positional should not be used together (just throw exception)
      And for the following case, it should work (@BindParam no need to specify)

      <button onClick="@('log', msg='logMessage')" label="@command"/>
      
      @Command
      public void log(String msg) {
          System.out.println(msg);
      }
      

      Acceptance Criteria

      1. @(vm.xxx) -> @load(vm.xxx)
      2. Able to use positional parameter in @command
      3. Adjust positional and non-positional behavior (as above description)

      Details

      1.
      MVVM simplified property binding syntax "@" should refer to "@bind"

      @init(vm.xxx) in MVVM is like el expression (${vm.xxx})

      it is not the idea of two-way binding.

      So the syntax sugar is not useful.

      2.
      for the symmetry

            DevChu DevChu
            DevChu DevChu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: