Interface ISortableListener<T>

  • Type Parameters:
    T - the type of the model object
    All Superinterfaces:
    org.apache.wicket.util.io.IClusterable, Serializable
    All Known Implementing Classes:
    Sortable, SortableAdapter

    public interface ISortableListener<T>
    extends org.apache.wicket.util.io.IClusterable
    Event listener shared by the Sortable widget and the SortableBehavior
    Author:
    Sebastien Briquet - sebfz1
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isOnReceiveEnabled()
      Indicates whether the 'receive' event is enabled.
      If true, the onReceive(AjaxRequestTarget, Object, int) event will be triggered.
      boolean isOnRemoveEnabled()
      Indicates whether the 'remove' event is enabled.
      If true, the onRemove(AjaxRequestTarget, Object) event will be triggered.
      void onReceive​(org.apache.wicket.ajax.AjaxRequestTarget target, T item, int index)
      Triggered when a connected sortable list has received an item from another list.
      void onRemove​(org.apache.wicket.ajax.AjaxRequestTarget target, T item)
      Triggered when a sortable item has been dragged out from the list and into another.
      void onUpdate​(org.apache.wicket.ajax.AjaxRequestTarget target, T item, int index)
      Triggered when the user stopped sorting and the DOM position has changed.
    • Method Detail

      • isOnReceiveEnabled

        boolean isOnReceiveEnabled()
        Indicates whether the 'receive' event is enabled.
        If true, the onReceive(AjaxRequestTarget, Object, int) event will be triggered.
        Returns:
        false by default
      • isOnRemoveEnabled

        boolean isOnRemoveEnabled()
        Indicates whether the 'remove' event is enabled.
        If true, the onRemove(AjaxRequestTarget, Object) event will be triggered.
        Returns:
        false by default
      • onUpdate

        void onUpdate​(org.apache.wicket.ajax.AjaxRequestTarget target,
                      T item,
                      int index)
        Triggered when the user stopped sorting and the DOM position has changed.
        Parameters:
        target - the AjaxRequestTarget
        item - the item that has been sorted
        index - the item's new index (zero based)
      • onReceive

        void onReceive​(org.apache.wicket.ajax.AjaxRequestTarget target,
                       T item,
                       int index)
        Triggered when a connected sortable list has received an item from another list.
        Parameters:
        target - the AjaxRequestTarget
        item - the item that has been received
        index - the item's new index (zero based)
      • onRemove

        void onRemove​(org.apache.wicket.ajax.AjaxRequestTarget target,
                      T item)
        Triggered when a sortable item has been dragged out from the list and into another.
        Parameters:
        target - the AjaxRequestTarget
        item - the item that has been received