Interface ItemController<Data,​Model,​P extends IComponent,​Item>

    • Method Detail

      • setModel

        void setModel​(@Nullable
                      Model model)
        Sets the given model to this controller.

        Note: calling this method after build(), you should invoke build() again to take effect to replace the current one at client.
        For example,

         
         uiAgent.replaceWith(locator, itemController.build());
         

        Default: null

      • getModel

        @Nullable
        Model getModel()
        Returns the model, which is set through by setModel(Object), or null.
      • setRenderer

        void setRenderer​(CheckedFunction2<Data,​java.lang.Integer,​Item> renderer)
        Sets the renderer which is used to render each data if getModel() is not null.

        Note: calling this method after build(), you should invoke build() again to take effect to replace the current one at client.
        For example,

         
         uiAgent.replaceWith(locator, itemController.build());
         

        Default: null, or depended on the implementation

      • build

        P build()
        Returns the immutable instance that the controller to build with
      • clear

        void clear()
        Clears all the rendered data.