Interface ComponentWidgetAdapter

  • All Known Implementing Classes:
    DefaultComponentWidgetAdapter

    public interface ComponentWidgetAdapter
    Represents an adapter that is responsible for communication with widgets. Allows you to send data to output sockets, as well reacts on registered input sockets. Should be used in 'non-widget' aware components (e.g. actions, editors) to provide a widget related functionality.
    • Field Detail

    • Method Detail

      • sendOutput

        void sendOutput​(java.lang.String socketId,
                        java.lang.Object data,
                        ComponentWidgetAdapterAware parent)
        Sends data to the output socked with the given ID.
        Parameters:
        socketId - output socket ID to sent the data to
        data - the data to be sent
      • addSocketInputEventListener

        void addSocketInputEventListener​(java.lang.String socketId,
                                         org.zkoss.zk.ui.event.EventListener<SocketEvent> eventListener)
        Registers an eventListener for input socket with the given ID.
        Parameters:
        socketId - output socket ID to sent the data to
        eventListener - event listener that is invoked when socket input event comes
      • registerStubInstance

        void registerStubInstance​(java.lang.String componentId,
                                  ComponentWidgetAdapterAware parent)
        Registers a particular stub widget instance for given 'non-widget' aware component

        Parameters:
        componentId - given component id e.g. editor id, action id
        parent - the parent for registered stub widget instance
      • unregisterStubInstance

        void unregisterStubInstance()
        Unregisters a particular stub widget instance associated with current instance of ComponentWidgetAdapter

      • handleSocketInputEvent

        void handleSocketInputEvent​(SocketEvent socketInputEvent)
        Handles a socket input event sent to this ComponentWidgetAdapterAware instance from outside.

        Parameters:
        socketInputEvent - a socket input event