org.wicketstuff.jquery.dnd
Class DnDBehaviour
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.wicketstuff.jquery.JQueryBehavior
org.wicketstuff.jquery.dnd.DnDBehaviour
- All Implemented Interfaces:
- Serializable, IBehaviorListener, IClusterable, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor
public class DnDBehaviour
- extends JQueryBehavior
- implements IBehaviorListener
This implementation is really too simple, only supporting one drop-container etc, but it is an ok
startingpoint to extend the functionality.
- See Also:
- Serialized Form
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, throttleScript |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DnDBehaviour
public DnDBehaviour()
DnDBehaviour
public DnDBehaviour(Options draggableOptions,
Options droppableOptions,
String dragSelector,
String dropSelector)
- Parameters:
draggableOptions - (helper=clone to "leave a copy" of the object you are dragging. Doesn't work
without helper argument.)droppableOptions - (hoverClass=cssClass to set on hover over a droppable)dropSelector - jquery selector setting what elements are droppable (example: #myListId li)dragSelector - jquery selector setting what elements are draggable (example: .draggable)
DnDBehaviour
public DnDBehaviour(String dragSelector,
String dropSelector)
- Parameters:
dropSelector - jquery selector setting what elements are droppable (example: #myListId li)dragSelector - jquery selector setting what elements are draggable (example: .draggable)
renderHead
public void renderHead(Component component,
IHeaderResponse response)
- Specified by:
renderHead in interface IComponentAwareHeaderContributor- Overrides:
renderHead in class JQueryBehavior
getDropScript
public String getDropScript()
respond
public final void respond(AjaxRequestTarget target)
- Overrides:
respond in class JQueryBehavior
getCallbackScript
protected CharSequence getCallbackScript()
- Overrides:
getCallbackScript in class AbstractDefaultAjaxBehavior
onDrop
public void onDrop(String srcId,
String destId,
AjaxRequestTarget target)
getOnReadyScript
protected CharSequence getOnReadyScript()
- Description copied from class:
JQueryBehavior
- to be override by subclass if need to run script when dom is ready. The returned script is
wrapped by caller into <script> tag and the "$(document).ready(function(){...}"
- Overrides:
getOnReadyScript in class JQueryBehavior
- Returns:
- the script to execute when the dom is ready, or null (default)
getRebindScript
public String getRebindScript()
Copyright © 2013. All Rights Reserved.