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

zk doesn't create a dynamically-set template

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • 8.6.3, 9.5.0.2
    • Databind 2
    • Security Level: Jimmy
    • ZK 9.5.1 S1
    • None

      Steps to Reproduce

      1. run the attached zul

      Current Result

      zk doesn't create the template

      Expected Result

      zk creates the template

      Debug Information

      1. this problem doesn't happen in 8.0.0 ~ 8.6.2.1
      2. It relates to the order of the onCreate event and onBindingReady event. The app developer sets a template in onCreate event. Since 8.6.3, onCreate event is fired later than onBindingReady, so ZK fails to resolve a template name when creating a template.

      Workaround

      set the template earlier in @Init

          @Init
          public void init(@ContextParam(ContextType.COMPONENT) Component component){
              initContent(component);//workaround
          }
      

        1. template.zul
          0.3 kB
          hawk
        2. TemplateVM.java
          1 kB
          hawk

            DevChu DevChu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: