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

Support a way to trigger MVVM command silently

    Details

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

      Description

      Sometimes we want a Form binding to save the data before or after some commands and these commands might not appear in a ViewModel object, so if there is a way to ignore the binder implementation throwing an exception.

      For example,

      // zul
      <grid form="@id('fx') @load(vm.currentBook) @save(vm.currentBook, before='save')"/>
      
      // java
      // @Command("save")
      // public void doSave() {}
      

        Activity

        Hide
        jumperchen jumperchen added a comment -

        Ready since 2015/11/12.

        If the command name starts with ":" or "/", it will be a silent command which won't cause an exception when ViewModel doesn't specify it (i.e. @Command on a method).

        Show
        jumperchen jumperchen added a comment - Ready since 2015/11/12. If the command name starts with ":" or "/", it will be a silent command which won't cause an exception when ViewModel doesn't specify it (i.e. @Command on a method).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours
              2h