public class AjaxDraggable extends AjaxComponent
AjaxDroppable.
When omitContainer is false (default), the contents nested inside of the
AjaxDraggable will be made draggable. Otherwise an existing DOM element with
the id specified via the id binding will be made draggable.
For the scriptaculous options see
http://wiki.github.com/madrobby/scriptaculous/draggable| Bindings | |
id | the id of the element to drag. When omitContainer is false, this
is the id of the container surrounding the component content. When
unspecified, a unique id will be generated. |
omitContainer | if set to true, the container element will be omitted.
The DOM id of the object to be made draggable must be specified with
the id binding. Defaults to false. |
elementName | the element to use for the container. defaults to "div". |
class | the css class of the container |
style | the css styles of the container |
draggableObject | a java object which is passed to the AjaxDroppable
when this draggable is dropped onto it. |
draggableID | draggableID |
starteffect | Effect, defaults to Effect.Opacity. Defines the effect
to use when the draggable starts being dragged |
reverteffect | Effect, default to Effect.Move. Defines the effect to
use when the draggable reverts back to its starting position |
endeffect | Effect, defaults to Effect.Opacity. Defines the effect to
use when the draggable stops being dragged |
zindex | integer value, defaults to 1000. The css z-index of the
draggable item |
revert | boolean or function reference, defaults to false. If set to
true, the element returns to its original position when the drags
ends. Revert can also be an arbitrary function reference, called
when the drag ends. Specifying 'failure' will instruct the draggable
not to revert if successfully dropped in a droppable. |
snap | set to false no snapping occurs. Otherwise takes one of the
following forms – Δi: one delta value for both horizontal and
vertical snap, [Δx, Δy]: delta values for horizontal and vertical
snap, function(x, y, draggable_object) { return [x, y]; }: a
function that receives the proposed new top left coordinate pair and
returns the coordinate pair to actually be used. |
ghosting | boolean, defaults to false. Clones the element and drags
the clone, leaving the original in place until the clone is dropped |
handle | string or DOM reference, not set by default. Sets whether the
element should only be draggable by an embedded handle. The value
must be an element reference or element id. The value may also be a
string referencing a CSS class value. The first
child/grandchild/etc. element found within the element that has this
CSS class value will be used as the handle. |
change | Called just as onDrag (which is the preferred callback). Gets
the Draggable instance as its parameter. |
keyPress | keyPress |
scroll | can be either a dom ID or a dom reference. In case of a dom
reference the value must not be quoted. Set binding to "window" to
scroll the window when the draggable reaches the window boundary.
Set binding to "'someID'" to scroll the element with ID "someID" |
WOComponent._EventLoggingEnabler, WOComponent.EventNSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.UtilityNSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessorNSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException_Extension, _IsEventLoggingEnabled, _keyAssociations_CLASS_CLASS, _KeyPathSeparatorChar, KeyPathSeparatorNullValue_CLASS| Constructor and Description |
|---|
AjaxDraggable(WOContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRequiredWebResources(WOResponse res)
Override this method to append the needed scripts for this component.
|
void |
appendToResponse(WOResponse res,
WOContext ctx)
Overridden to call
AjaxComponent.addRequiredWebResources(WOResponse). |
void |
awake() |
NSDictionary<java.lang.String,java.lang.String> |
createAjaxOptions() |
java.lang.String |
draggableID() |
static java.lang.Object |
draggableObjectForPage(WOComponent page,
java.lang.String draggableID) |
java.lang.String |
elementName() |
WOActionResults |
handleRequest(WORequest request,
WOContext context)
Override this method to return the response for an Ajax request.
|
java.lang.String |
id() |
boolean |
isStateless() |
void |
reset() |
_containerID, addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, appendTagAttributeToResponse, booleanValueForBinding, invokeAction, safeElementID, shouldHandleRequest, valueForBinding, valueForBinding, valueForBinding__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithNamepublic AjaxDraggable(WOContext context)
public void awake()
awake in class WOComponentpublic void reset()
reset in class WOComponentpublic boolean isStateless()
isStateless in class WOComponentpublic static java.lang.Object draggableObjectForPage(WOComponent page, java.lang.String draggableID)
public void appendToResponse(WOResponse res, WOContext ctx)
AjaxComponentAjaxComponent.addRequiredWebResources(WOResponse).appendToResponse in class AjaxComponentres - the HTTP response that an application returns to a Web server to complete a cycle of the request-response loopctx - context of a transactionpublic NSDictionary<java.lang.String,java.lang.String> createAjaxOptions()
public java.lang.String id()
public java.lang.String elementName()
public java.lang.String draggableID()
protected void addRequiredWebResources(WOResponse res)
AjaxComponentaddRequiredWebResources in class AjaxComponentres - the response to write topublic WOActionResults handleRequest(WORequest request, WOContext context)
AjaxComponenthandleRequest in interface IAjaxElementhandleRequest in class AjaxComponentrequest - the requestcontext - the contextCopyright © 2002 – 2022 Project Wonder.