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

HtmlMacroComponent compose() doesn't resolve @Wire before doAfterCompose

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 8.5.2
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      Run attached project
      Open the test.zul page

      Current Result

      the line1 component is not wired during doAfterCompose(), which causes a NPE

      Expected Result

      the line1 component is wired during doAfterCompose(), which allow doAfterCompose logic to access the component

      Debug Info

      After change:
      https://github.com/zkoss/zk/blob/c400ef364856fc457031c6f7276472f82a6a3364/zk/src/org/zkoss/zk/ui/HtmlMacroComponent.java#L175
      During compose, the MacroComponent register an event to @Wire components later

      Before change:
      https://github.com/zkoss/zk/blob/dcdff5594b66c63f0659e6fa8de47cf3bfa45869/zk/src/org/zkoss/zk/ui/HtmlMacroComponent.java#L174
      Component wiring happen directly during compose()

      Root Cause

      Issue introduced by ZK-3843
      https://github.com/zkoss/zk/commit/c400ef364856fc457031c6f7276472f82a6a33643

        Activity

        Hide
        JamesChu JamesChu added a comment -

        Fixed since 2018/07/16

        Show
        JamesChu JamesChu added a comment - Fixed since 2018/07/16

          People

          • Assignee:
            klyvechen klyvechen
            Reporter:
            MDuchemin MDuchemin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: