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

Unknown stub error


    • 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

      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. error.png
          80 kB
        2. ExampleDTO.java
          3 kB
        3. list1.png
          53 kB
        4. ListaExample.java
          5 kB
        5. ListaExampleRenderer.java
          5 kB
        6. listaExampleStatic2.zul
          3 kB
        7. Nativespan.java
          1 kB

            vincentjian vincentjian
            samchuang samchuang
            0 Vote for this issue
            0 Start watching this issue