Interface CockpitWidgetEngine

  • All Known Implementing Classes:
    AdminmodeWidgetEngine, DefaultCockpitWidgetEngine

    public interface CockpitWidgetEngine
    The cockpit widget engine is responsible for injecting the view definitions into the zul page as well as sending socket events between the widgets.
    • Method Detail

      • isIndependentView

        default boolean isIndependentView​(WidgetDefinition widget,
                                          java.lang.String uri)
        Checks whether provided URL points to widget's view, which is defined as not dependent from ZK framework (i.e. uses pure html or some third party javascript library)
        Parameters:
        widget - widget definition to be checked
        uri - requested URL
        Returns:
        true if a URL points to view that is defined as independent
      • createWidgetView

        void createWidgetView​(Widgetslot widgetslot)
        Creates the view components for the specified widgetslot. If no widget is attached to the slot, an error is displayed, otherwise the view representation of the attached widget is injected.
      • createWidgetView

        void createWidgetView​(Widgetchildren widgetChildrenComponent,
                              java.util.Map<java.lang.String,​java.lang.Object> ctx)
        Creates the view components for the specified widgetchildren slot. For each matching child widget it creates a container, according to the type of the widgetchildren.
      • sendOutput

        void sendOutput​(Widgetslot widgetslot,
                        java.lang.String outputID)
        Calls sendOutput(widgetslot, outputID, null)}.
      • sendOutput

        void sendOutput​(Widgetslot widgetslot,
                        java.lang.String outputID,
                        java.lang.Object data)
        Calls sendOutput(widgetslot, outputID, data, false)}.
      • sendOutput

        void sendOutput​(Widgetslot widgetslot,
                        java.lang.String outputID,
                        java.lang.Object data,
                        boolean ignoreSockets)
        Sends an output event from the widget attached to the widgetslot parameter with the given outputID. This method is finally called from DefaultWidgetController.sendOutput(String, Object).
        Parameters:
        widgetslot - The source widget slot
        outputID - The output socket id
        data - The event data
        ignoreSockets - If false, the event is only sent if the output socket with outputID exists. Otherwise no check is done and the event is sent. This is only needed for internal use, especially for composed widget internal event handling.