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

Unknown stub error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.0
    • Fix Version/s: 6.5.1
    • Component/s: Components
    • Labels:
      None

      Description

      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.

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: