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.2.0
    • Component/s: None
    • Labels:
      None

      Description

      1. No need to define view model id

      viewModel="@id('vm') @init('...')" -> viewModel="@('...')"
      

      2. Use id space to get nearest vm

      @load(vm.aaa) -> @(aaa)
      

      3. No need to define @Command in ViewModel

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

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

      5. Provide shortcut for MVVM expression in ZUL

      @load(vm.aaa) -> @(aaa)
      @bind(vm.aaa) -> @(aaa)  //auto bind in input element
      @commnad('cmd') -> @('cmd') //auto bind in event (ex. onClick, onXxx...)
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: