Class Selectable<T extends Serializable>

    • Constructor Detail

      • Selectable

        public Selectable​(String id,
                          List<T> items)
        Constructor
        Parameters:
        id - the markup id
        items - the list the Selectable should observe.
      • Selectable

        public Selectable​(String id,
                          IModel<? extends List<T>> items)
        Constructor
        Parameters:
        id - the markup id
        items - the list the Selectable should observe.
      • Selectable

        public Selectable​(String id,
                          IModel<? extends List<T>> model,
                          List<T> items)
        Constructor
        Parameters:
        id - the markup id
        model - the list of selected items
        items - the list the Selectable should observe.
      • Selectable

        public Selectable​(String id,
                          IModel<? extends List<T>> model,
                          IModel<? extends List<T>> items)
        Constructor
        Parameters:
        id - the markup id
        model - the list of selected items
        items - the list the Selectable should observe.
    • Method Detail

      • getItemList

        protected List<T> getItemList()
        Gets the reference list of all selectable items.
        Returns:
        the list of all selectable items.
      • getItemSelector

        protected String getItemSelector()
        Gets the selector that identifies the selectable item within a Selectable
        The selector should be the path from the Selectable to the item (for instance '#myUL LI', where '#myUL' is the Selectable's selector)
        Returns:
        "li" by default
      • newSelectedBehavior

        protected com.googlecode.wicket.jquery.core.JQueryAbstractBehavior newSelectedBehavior()
        Gets the JQueryAbstractBehavior in charge of selecting default items (matching model object)
        Returns:
        the JQueryAbstractBehavior
      • newWidgetBehavior

        public com.googlecode.wicket.jquery.core.JQueryBehavior newWidgetBehavior​(String selector)
        Specified by:
        newWidgetBehavior in interface com.googlecode.wicket.jquery.core.IJQueryWidget
      • createDraggable

        public Draggable<?> createDraggable​(String id)
        Creates a Draggable object that is related to this Selectable.
        Uses a default factory that will create a Draggable with a ui-icon-arrow-4-diag icon
        Parameters:
        id - the markup id
        Returns:
        the Draggable