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

Simplify MVVM syntax

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 9.5.0
    • None
    • Databind 2

      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...)

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

              Created:
              Updated:
              Resolved: