Class WidgetControllers


  • public final class WidgetControllers
    extends java.lang.Object
    Utility class used by the cockpit engine to setup instances of WidgetController.
    • Field Detail

      • GROUP_CHILD_SETTINGS_SEPARATOR

        public static final char GROUP_CHILD_SETTINGS_SEPARATOR
        See Also:
        Constant Field Values
    • Method Detail

      • initWidgetSetting

        public static void initWidgetSetting​(TypedSettingsMap settings,
                                             java.lang.String key,
                                             java.lang.Object initialValue,
                                             java.lang.Class settingClass)
      • initWidgetSetting

        public static void initWidgetSetting​(TypedSettingsMap settings,
                                             java.lang.String key,
                                             java.lang.Object initialValue)
      • initSettings

        public static void initSettings​(org.zkoss.zk.ui.Component comp,
                                        WidgetInstanceManager widgetInstanceManager)
      • addWidgetSocketListeners

        public static void addWidgetSocketListeners​(Widgetslot slot,
                                                    java.lang.String socketId,
                                                    org.zkoss.zk.ui.event.EventListener listener)
        Adds an input socket listener for messages received by specified widgetslot.
        Parameters:
        slot - widget slot
        socketId - identity of socket to be listened to
        listener - listener to be notified about incoming messages
      • addWidgetSocketListeners

        public static void addWidgetSocketListeners​(org.zkoss.zk.ui.Component comp,
                                                    java.lang.String socketId,
                                                    org.zkoss.zk.ui.event.EventListener listener)
      • setupWidgetEventListeners

        public static void setupWidgetEventListeners​(org.zkoss.zk.ui.Component comp,
                                                     java.lang.Object controller,
                                                     WidgetInstanceManager widgetInstanceManager,
                                                     WidgetUtils widgetUtils)
      • bindGlobalEventListenerIfPresent

        public static void bindGlobalEventListenerIfPresent​(java.lang.reflect.Method method,
                                                            java.lang.Object controller,
                                                            WidgetInstanceManager widgetInstanceManager,
                                                            WidgetUtils widgetUtils,
                                                            org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> afterInvokeListener)
      • wireModuleApplicationContext

        public static void wireModuleApplicationContext​(org.springframework.context.ApplicationContext appCtx,
                                                        java.lang.Object controller,
                                                        org.zkoss.zk.ui.Page page)
      • getSocketEventIdIfAny

        public static java.lang.String getSocketEventIdIfAny​(java.lang.reflect.Method method)
      • fireEvent

        public static void fireEvent​(java.lang.Object controller,
                                     org.zkoss.zk.ui.event.Event event,
                                     java.lang.reflect.Method method)
                              throws java.lang.reflect.InvocationTargetException,
                                     java.lang.IllegalAccessException
        Throws:
        java.lang.reflect.InvocationTargetException
        java.lang.IllegalAccessException