Simplify MVVM syntax

XMLWordPrintable

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

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

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

              Created:
              Updated:
              Resolved: