Function createWidgets

  • Creates widgets based on an array of JavaScritp codes generated by Component.redraw() at the server.

    This method is usually used with Java's ComponentsCtrl.redraw, and zk.Widget.replaceCavedChildren_.

    Notice that, since the creation of widgets might cause some packages to be loaded, the callback function, fn, might be called after this method is returned

    Parameters

    • codes: ArrayLike<unknown>[]

      an array of JavaScript objects generated at the server. For example, smartUpdate("foo", ComponentsCtrl.redraw(getChildren());

    • fn: ((wgts) => void)

      the callback function. When the widgets are created. fn is called with an array of zk.Widget. In other words, the callback's signature is as follows:
      void callback(zk.Widget[] wgts);

        • (wgts): void
        • Parameters

          Returns void

    • Optional filter: ((wgt) => undefined | Widget<HTMLElement>)

      the filter to avoid the use of widgets being replaced. Ignored if null

        • (wgt): undefined | Widget<HTMLElement>
        • Parameters

          Returns undefined | Widget<HTMLElement>

    Returns void

    Since

    5.0.2