org.wicketstuff.jquery.dnd
Class DnDSortableHandler

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.markup.html.WebComponent
          extended by org.wicketstuff.jquery.dnd.DnDSortableHandler
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.IClusterable, org.apache.wicket.IConverterLocator

public abstract class DnDSortableHandler
extends org.apache.wicket.markup.html.WebComponent

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.Component
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor<T extends org.apache.wicket.Component>, org.apache.wicket.Component.VisibilityChange
 
Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER
 
Constructor Summary
DnDSortableHandler(java.lang.String id)
           
DnDSortableHandler(java.lang.String id, Options options)
          the Sortable's options (see http://interface.eyecon.ro/docs/sort for the list of options).PropertyPlaceholderConfigurer
 
Method Summary
 java.lang.CharSequence getJSFunctionName4Start()
           
 java.lang.CharSequence getJSFunctionName4Stop()
           
 java.lang.CharSequence getRebindScript()
           
abstract  boolean onDnD(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.MarkupContainer srcContainer, int srcPos, org.apache.wicket.MarkupContainer destContainer, int destPos)
          Call when a component has been moved on client side.
 DnDSortableHandler registerContainer(org.apache.wicket.MarkupContainer v)
          Register a container as a container for draggable/droppable items.
 DnDSortableHandler registerItem(org.apache.wicket.Component v)
          Register a component as draggable/moveable item.
 
Methods inherited from class org.apache.wicket.markup.html.WebComponent
onRender
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onComponentTag, onComponentTagBody, onConfigure, onDetach, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModel, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMarkupStream, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, toString, toString, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DnDSortableHandler

public DnDSortableHandler(java.lang.String id)

DnDSortableHandler

public DnDSortableHandler(java.lang.String id,
                          Options options)
the Sortable's options (see http://interface.eyecon.ro/docs/sort for the list of options).PropertyPlaceholderConfigurer

Parameters:
id - See Component
options - the undefault options
Method Detail

onDnD

public abstract boolean onDnD(org.apache.wicket.ajax.AjaxRequestTarget target,
                              org.apache.wicket.MarkupContainer srcContainer,
                              int srcPos,
                              org.apache.wicket.MarkupContainer destContainer,
                              int destPos)
Call when a component has been moved on client side.

Parameters:
target - a target, provide if a response,
srcContainer - the source container from where item come, (null if not previously registered by via registerContainer(...)).
srcPos - the position/index of item into srcContainer before moving.
destContainer - the destination container where item is, (null if not previously registered by via registerContainer(...)).
destPos - the position/index of item into srcContainer after moving.
Returns:
false if you don't need to keep in sync component, markupId on serverside and client side, else return true to send to client side the srcContainer and destContainer and to update the handler (consume more resource, server, network, client).

registerContainer

public DnDSortableHandler registerContainer(org.apache.wicket.MarkupContainer v)
Register a container as a container for draggable/droppable items. (add the css class and markupId to be find on clientside).

Parameters:
v - the container to register.
Returns:
this

registerItem

public DnDSortableHandler registerItem(org.apache.wicket.Component v)
Register a component as draggable/moveable item. (add the css class and markupId to be find on clientside).

Parameters:
v - the component to register.
Returns:
this

getJSFunctionName4Start

public java.lang.CharSequence getJSFunctionName4Start()
Returns:
the name of the javascript function to start the behavior on client side.

getJSFunctionName4Stop

public java.lang.CharSequence getJSFunctionName4Stop()
Returns:
the name of the javascript function to stop the behavior on client side.

getRebindScript

public java.lang.CharSequence getRebindScript()


Copyright © 2011. All Rights Reserved.