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" |
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
_Extension, _IsEventLoggingEnabled, _keyAssociations
Constructor and Description |
---|
AjaxDraggable(com.webobjects.appserver.WOContext context) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRequiredWebResources(com.webobjects.appserver.WOResponse res)
Override this method to append the needed scripts for this component.
|
void |
appendToResponse(com.webobjects.appserver.WOResponse res,
com.webobjects.appserver.WOContext ctx)
Overridden to call
AjaxComponent.addRequiredWebResources(WOResponse) . |
void |
awake() |
NSDictionary<String,String> |
createAjaxOptions() |
String |
draggableID() |
static Object |
draggableObjectForPage(com.webobjects.appserver.WOComponent page,
String draggableID) |
String |
elementName() |
com.webobjects.appserver.WOActionResults |
handleRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.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 void awake()
awake
in class com.webobjects.appserver.WOComponent
public void reset()
reset
in class com.webobjects.appserver.WOComponent
public boolean isStateless()
isStateless
in class com.webobjects.appserver.WOComponent
public static Object draggableObjectForPage(com.webobjects.appserver.WOComponent page, String draggableID)
public void appendToResponse(com.webobjects.appserver.WOResponse res, com.webobjects.appserver.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(com.webobjects.appserver.WOResponse res)
AjaxComponent
addRequiredWebResources
in class AjaxComponent
res
- the response to write topublic com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
AjaxComponent
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxComponent
request
- the requestcontext
- the contextCopyright © 2002 – 2020 Project Wonder.