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

Unknown stub error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.1
    • 6.5.0
    • Components
    • None

      refer to the sample code,

      1. visit URL for example
      listaExampleStatic2.zul?record=10

      2. click the "Importo" column header twice, will cause Unknown stub js error. (when using zkmax.jar, without zkmax.jar, it's ok, ZK will show UI correctly)

      The reason is with zkmax.jar, the UiEngineExtension will replace the NativeComponent into StubComponent or StubsComponent, to minimize server side memory usage

      When render StubComponent or StubsComponent, ZK will render only UUID to client, from the code, it seems the widget shall still remain in client side, refer to the mount.js
      if ((stub = type == "#stub") || type == "#stubs") {
      ....
      }

      but zk client side engine cannot find the widget, cause the JS error.

      The workaround is extends from HtmlNativeComponent, and invoke setAttribute(Attributes.STUB_NATIVE, false);
      This can prevent ZK UI engine replace it with StubComponent.

        1. Nativespan.java
          1 kB
        2. listaExampleStatic2.zul
          3 kB
        3. ListaExampleRenderer.java
          5 kB
        4. ListaExample.java
          5 kB
        5. list1.png
          list1.png
          53 kB
        6. ExampleDTO.java
          3 kB
        7. error.png
          error.png
          80 kB

            vincentjian vincentjian
            samchuang samchuang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: