Interface ComponentMarkingUtils

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void markComponent​(org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.Component component, java.lang.String markName)
      Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with it, a renderer may mark it, so that then controller may assign a logic to it.
      void markComponent​(org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.Component component, java.lang.String markName, java.lang.Object markData)
      Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with it, a renderer may mark it, so that then controller may assign a logic to it.
      void moveMarkedComponents​(org.zkoss.zk.ui.Component source, org.zkoss.zk.ui.Component target)
      Copies the marked components data structure from source component to target component and removes it from the source component
      void registerMarkedComponentsListener​(org.zkoss.zk.ui.Component parent, java.lang.String markName, java.lang.String eventName, MarkedEventListener listener)
      Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with it, a renderer may mark it, so that then controller may assign a logic to it.
    • Method Detail

      • markComponent

        void markComponent​(org.zkoss.zk.ui.Component parent,
                           org.zkoss.zk.ui.Component component,
                           java.lang.String markName)
        Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with it, a renderer may mark it, so that then controller may assign a logic to it. This method should mark component appropriately.
        Parameters:
        parent - parent component which will get a data structure of all marked components for every mark; it should be the same object as the one passed as parent to render method
        component - component to be marked
        markName - name of the mark - this value should be known by controller
        See Also:
        registerMarkedComponentsListener(Component, String, String, MarkedEventListener)
      • markComponent

        void markComponent​(org.zkoss.zk.ui.Component parent,
                           org.zkoss.zk.ui.Component component,
                           java.lang.String markName,
                           java.lang.Object markData)
        Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with it, a renderer may mark it, so that then controller may assign a logic to it. This method should mark component appropriately.
        Parameters:
        parent - parent component which will get a data structure of all marked components for every mark; it should be the same object as the one passed as parent to render method
        component - component to be marked
        markName - name of the mark - this value should be known by controller
        markData - any data object that may be needed by controller to perform a logic
        See Also:
        registerMarkedComponentsListener(Component, String, String, MarkedEventListener)
      • registerMarkedComponentsListener

        void registerMarkedComponentsListener​(org.zkoss.zk.ui.Component parent,
                                              java.lang.String markName,
                                              java.lang.String eventName,
                                              MarkedEventListener listener)
        Whenever a component created by renderer that widget controller is not aware of, but there is a logic related with it, a renderer may mark it, so that then controller may assign a logic to it. This method registers an UI event to all marked children components. It also makes sure that there is only one consumer for specified event and mark name on particular component.

        To assure that a particular logic is registered as listener is registered only once, it may be wrapped with Identifiable interface. If a listener provided is of type Identifiable and a listener with same id is already registered, then the old one will be removed before new is registered.

        Parameters:
        parent - parent component to which marked children logic should be assigned
        markName - name of the mark
        eventName - UI event name which should trigger the logic
        listener - whenever an event takes place, a consumer will be asked with initial event and with data retrieved from a component
        See Also:
        Identifiable
      • moveMarkedComponents

        void moveMarkedComponents​(org.zkoss.zk.ui.Component source,
                                  org.zkoss.zk.ui.Component target)
        Copies the marked components data structure from source component to target component and removes it from the source component
        Parameters:
        source - component from which the marked components should be copied and removed
        target - component to which the marked components should be copied to