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

add an option to enable deferrable/lazy @save() bindings

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Later Later
    • 8.0.1
    • 8.0.0
    • Databind 2
    • Security Level: Jimmy
    • ZK 8.0.1 S1
    • None

      unconditional value binding sometimes causes many AU request-response cycles, when the information isn't really required on the server immediately.

      here a simple example:

      <div viewModel="@id('vm') @init('a.b.c.SomeViewModel')">
      	<textbox id="t1" value="@bind(vm.text1)"/>
      	<textbox id="t2" value="@load(vm.text2) @save(vm.text2)"/>
      	<textbox id="t3" value="@load(vm.text3) @save(vm.text3, before='save')"/>
      	<button onClick="@command('save')"/>
      </div>
      

      The textboxes "t1" and "t2" will fire onChange events immediately after the change.
      In a simple scenario this can be avoided as in case "t3" by specifying a depending command. This may become cumbersome when multiple commands are used.

      In many cases it would be sufficient to mark the onChange event deferrable, to avoid unecessary AU requests to fine tune the application performance.

      A way to declare a deferrable (but still unconditional) @save binding would help.

      On top of that a library property (or similar mechanism) could be introduced to change the way @save binding listeners are created. This would allow to enable this feature globally or only for a certain component and its subtree, without having to maintain the bindings directly.

            wenninghsu wenninghsu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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