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

load binding order/cleanup problem

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Freshly, 8.0.5, 8.6.1, 8.6.0.1
    • Fix Version/s: 8.6.2
    • Component/s: Databind 2
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S1, ZK 8.6.2 S2

      Description

      Steps to Reproduce

      load-binding-sequence-error.zul

      toggle the checkbox to switch the template from floating point to text input.

      Current Result

      when checking an error occurs:

      Feb 26, 2019 5:24:32 PM org.zkoss.zk.ui.impl.UiEngineImpl handleError
      SEVERE: 
      java.lang.NumberFormatException: For input string: "Test"
      	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
      	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
      	at java.base/java.lang.Double.parseDouble(Double.java:543)
      	at java.base/java.lang.Double.<init>(Double.java:625)
      	at org.zkoss.lang.Classes.coerce(Classes.java:1373)
      	at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:87)
      	at org.zkoss.bind.impl.BinderImpl.doPropertyChange0(BinderImpl.java:480)
      	at org.zkoss.bind.impl.BinderImpl.doPropertyChange(BinderImpl.java:455)
      	at org.zkoss.bind.impl.BinderImpl.access$300(BinderImpl.java:136)
      	at org.zkoss.bind.impl.BinderImpl$QueueListener.onEvent(BinderImpl.java:414)
      	at org.zkoss.zk.ui.event.impl.DesktopEventQueue$QueueListener.onEvent(DesktopEventQueue.java:168)
      	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3179)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3149)
      	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3091)
      	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1845)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1617)
      	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1320)
      	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611)
      ...
      

      Expected Result

      no error
      template should render first and then trigger the load bindings of the newly rendered children

      Debug Info

      when setting a breakpoint it becomes obvious that the @load binding for vm.value still fires on the doublebox, even though the template should have switched to textbox already

      Root Cause

      either the @load bindings trigger too early or they are not cleaned up for detached components at this point

      Workaround

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: