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/draggableName | Description |
---|---|
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.Event
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
NSKeyValueCoding._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.ValueAccessor
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
_Extension, _IsEventLoggingEnabled, _keyAssociations
_CLASS
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
NullValue
_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<String,String> |
createAjaxOptions() |
String |
draggableID() |
static Object |
draggableObjectForPage(WOComponent page,
String draggableID) |
String |
elementName() |
WOActionResults |
handleRequest(WORequest request,
WOContext context)
Override this method to return the response for an Ajax request.
|
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, variableWithName
public AjaxDraggable(WOContext context)
public void awake()
awake
in class WOComponent
public void reset()
reset
in class WOComponent
public boolean isStateless()
isStateless
in class WOComponent
public static Object draggableObjectForPage(WOComponent page, String draggableID)
public void appendToResponse(WOResponse res, WOContext ctx)
AjaxComponent
AjaxComponent.addRequiredWebResources(WOResponse)
.appendToResponse
in class AjaxComponent
res
- 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<String,String> createAjaxOptions()
public String id()
public String elementName()
public String draggableID()
protected void addRequiredWebResources(WOResponse res)
AjaxComponent
addRequiredWebResources
in class AjaxComponent
res
- the response to write topublic WOActionResults handleRequest(WORequest request, WOContext context)
AjaxComponent
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxComponent
request
- the requestcontext
- the contextCopyright © 2002 – 2024 Project Wonder.