Class SelectableBehavior<T extends Serializable>
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
-
- com.googlecode.wicket.jquery.core.JQueryBehavior
-
- com.googlecode.wicket.jquery.ui.JQueryUIBehavior
-
- com.googlecode.wicket.jquery.ui.interaction.selectable.SelectableBehavior<T>
-
- Type Parameters:
T
- the object type
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
,JQueryDestroyListener.IDestroyable
,Serializable
,org.apache.wicket.IComponentAwareEventSink
,org.apache.wicket.markup.html.IComponentAwareHeaderContributor
,org.apache.wicket.util.io.IClusterable
public abstract class SelectableBehavior<T extends Serializable> extends JQueryUIBehavior implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
Provides a jQuery selectable behavior- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
SelectableBehavior.OnStopAjaxBehavior
Provides aJQueryAjaxBehavior
that aims to be wired to the 'stop' eventprotected static class
SelectableBehavior.StopEvent
Provides an event object that will be broadcasted by theOnStopAjaxBehavior
callback
-
Constructor Summary
Constructors Constructor Description SelectableBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, ISelectableListener<T> listener)
ConstructorSelectableBehavior(String selector, ISelectableListener<T> listener)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
bind(org.apache.wicket.Component component)
protected abstract List<T>
getItemList()
Gets the reference list of all selectable items.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)protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior
newOnStopAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
Gets a newJQueryAjaxBehavior
that will be wired to the 'stop' event, triggered when the user has selected itemsvoid
onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
void
onConfigure(org.apache.wicket.Component component)
-
Methods inherited from class com.googlecode.wicket.jquery.ui.JQueryUIBehavior
destroy, onDestroy, widget, widget, widget, widget
-
Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior
$, $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, renderHead, setOption, setOption, setOption, setOptions, setSelector
-
Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString
-
-
-
-
Field Detail
-
METHOD
public static final String METHOD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SelectableBehavior
public SelectableBehavior(String selector, ISelectableListener<T> listener)
Constructor- Parameters:
selector
- the html selector (ie: "#myId")listener
- theISelectableListener
-
SelectableBehavior
public SelectableBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, ISelectableListener<T> listener)
Constructor- Parameters:
selector
- the html selector (ie: "#myId")options
- theOptions
listener
- theISelectableListener
-
-
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
-
bind
public void bind(org.apache.wicket.Component component)
- Overrides:
bind
in classorg.apache.wicket.behavior.Behavior
-
onConfigure
public void onConfigure(org.apache.wicket.Component component)
- Overrides:
onConfigure
in classJQueryUIBehavior
-
onAjax
public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
- Specified by:
onAjax
in interfacecom.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 newJQueryAjaxBehavior
that will be wired to the 'stop' event, triggered when the user has selected items- Parameters:
source
- theIJQueryAjaxAware
- Returns:
- a new
OnStopAjaxBehavior
by default
-
-