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

Simplify MVVM syntax

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 9.5.0
    • Component/s: Databind 2
    • Labels:

      Description

      1. No need to define view model id, the view model id will be 'vm' by default.

      Old New
      viewModel="@id('vm') @init('...')"
      viewModel="@('...')"

      2. No need to define @Command in ViewModel

      3. Instead of @BindingParam, use the order of the parameters

      Old New
      onClick="@command('doClick', aa=123, ss=1, bb='asssas,sa2')"
      onClick="@('doClick', 123, 1, 'asssas,sa2')"

      4. Provide shortcut for MVVM expression in ZUL

      Old New
      @init(vm.aaa)
      @(vm.aaa)
      @command('cmd')
      @('cmd') //auto bind in event (ex. onClick, onXxx...)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              DevChu DevChu
              Reporter:
              DevChu DevChu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: