Variable WidgetInfo

WidgetInfo: {
    all: {
        page: string;
    };
    getClassName(wgtnm): string;
    loadAll(f, weave): void;
    register(infs): void;
} = ...

Type declaration

  • all: {
        page: string;
    }

    A map (Map) of widget informations (readonly). The key is the widget name, such as textbox, and the value is the class name. However the value might be changed in the future, so it is better to iterate only the keys.

    To add a mapping, use WidgetInfo.register.

    • page: string
  • getClassName:function
    • Parameters

      • wgtnm: string

        the widget name, such as textbox

      Returns string

      the class name of the widget, such as "zul.inp.Textbox".

  • loadAll:function
    • Loads all packages requires by all widgets. It is usually used in a visual designer, such as ZK Weaver, to make sure the classes of all widgets are available to use.

      Parameters

      • f: (() => void)

        the function to run after all packages are loaded

          • (): void
          • Returns void

      • weave: boolean

        whether to load the package used for ZK weaver. For example, if a package is called zul.wnd, then we assume zul.wnd.wv is the package for widgets defined in zul.wnd to communicate with ZK Weaver.

      Returns void

  • register:function
    • Registers an arry of widget information.

      Parameters

      • infs: string[]

        an array of widget class names. For example, ['zul.wnd.Window', 'zul.inp.Textbox'].

      Returns void