Class SelectableBehavior<T extends Serializable>

    • Constructor Detail

      • SelectableBehavior

        public SelectableBehavior​(String selector,
                                  com.googlecode.wicket.jquery.core.Options options,
                                  ISelectableListener<T> listener)
        Constructor
        Parameters:
        selector - the html selector (ie: "#myId")
        options - the Options
        listener - the ISelectableListener
    • Method Detail

      • getItemList

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

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

        public void onAjax​(AjaxRequestTarget target,
                           com.googlecode.wicket.jquery.core.JQueryEvent event)
        Specified by:
        onAjax in interface com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
      • newOnStopAjaxBehavior

        protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnStopAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
        Gets a new JQueryAjaxBehavior that will be wired to the 'stop' event, triggered when the user has selected items
        Parameters:
        source - the IJQueryAjaxAware
        Returns:
        a new OnStopAjaxBehavior by default