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 theSortable
widget and theSortableBehavior
- 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, theonReceive(AjaxRequestTarget, Object, int)
event will be triggered.boolean
isOnRemoveEnabled()
Indicates whether the 'remove' event is enabled.
If true, theonRemove(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, theonReceive(AjaxRequestTarget, Object, int)
event will be triggered.- Returns:
- false by default
-
isOnRemoveEnabled
boolean isOnRemoveEnabled()
Indicates whether the 'remove' event is enabled.
If true, theonRemove(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
- theAjaxRequestTarget
item
- the item that has been sortedindex
- 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
- theAjaxRequestTarget
item
- the item that has been receivedindex
- 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
- theAjaxRequestTarget
item
- the item that has been received
-
-