public class ERDragAndDropUpload extends ERXNonSynchronizingComponent
If you want to include a file selector to the drop-area, then either
use includeFileSelector or add one in another location as:
<wo:genericContainer elementName = "input" type = "file" id = "fileSelectorID" multiple = "multiple" />
and bind fileSelectorID to the id.
If you just want a file selector button without the drop area, then
use this component with no content and includeFileSelector set to true.
This version also uses a fix from Michael Kondratov for the completeAllFunction in dndupload.js. completeAllFunction now works as advertised.
Name | Description |
---|---|
accept | an array of accepted mimetypes. If no mimetypes are specified, all are accepted. ex. (image/png, image/jpg, text/*) |
action | the action to fire when an attachment is uploaded |
attachment | the uploaded attachment |
completeAllFunction | a javascript function to execute when all dropped files are processed |
completeFunction | a javascript function to execute after each uploaded file is processed. This function accepts two args. The first is the event. The second is the file. |
configurationName | the configuration name. See the package javadocs for more info. |
disabled | if true, the upload component is disabled and only displays component content |
editingContext | the editing context where the ERAttachments will be created |
enterFunction | a javascript function to execute when dragged files enter the drop target |
errorFunction | a javascript function to execute when a file upload error occurs. This function accepts two args. The first is the event. The second is the file. |
exitFunction | a javascript function to execute when dragged files exit the drop target |
overFunction | a javascript function to execute when dragged files are over the drop target |
storageType | the ERAttachment storage type (db, file, s3, cf, ...) |
includeFileSelector | a file selector appears at the top of the drag-area. |
fileSelectorID | include an id to a file selector outside of the component. Can be used if more custom file selector behavior is needed. |
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
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
Constructor and Description |
---|
ERDragAndDropUpload(com.webobjects.appserver.WOContext context) |
Modifier and Type | Method and Description |
---|---|
protected String |
_frameworkName()
Returns the name of this component's framework or "app" if
frameworkName() returns null.
|
NSArray<String> |
accept() |
boolean |
acceptMimetype(String mimetype) |
protected NSArray<String> |
additionalJavascriptFiles()
Returns an array of additional Javascript files for this component, or
null (or empty array) if there aren't any.
|
String |
configurationName()
The ERAttachment configuration name for the uploaded files.
|
String |
dropTargetID() |
com.webobjects.eocontrol.EOEditingContext |
editingContext()
The EOEditingContext where the ERAttachment will be created
|
String |
fileSelectorID() |
com.webobjects.appserver.WOActionResults |
invokeAction(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.invokeAction. |
String |
postURL()
The ajax request URL for this component.
|
String |
storageType()
The ERAttachment storage type for the uploaded files.
|
void |
takeValuesFromRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.takeValuesFromRequest. |
appendToResponse, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings
_awakeInContext, _checkAccess, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, arrayValueForBinding, arrayValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browser, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, reset, shouldCheckAccess, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript
__valueForBinding, _associationWithName, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
public ERDragAndDropUpload(com.webobjects.appserver.WOContext context)
public String dropTargetID()
public String fileSelectorID()
protected NSArray<String> additionalJavascriptFiles()
ERXComponent
additionalJavascriptFiles
in class ERXComponent
protected String _frameworkName()
ERXComponent
_frameworkName
in class ERXComponent
public String postURL()
public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.invokeAction.invokeAction
in class ERXNonSynchronizingComponent
request
- for which the action is invokedcontext
- of the requestpublic void takeValuesFromRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.takeValuesFromRequest.takeValuesFromRequest
in class ERXNonSynchronizingComponent
request
- from which the values will be takencontext
- of the requestpublic String storageType()
public String configurationName()
public com.webobjects.eocontrol.EOEditingContext editingContext()
public boolean acceptMimetype(String mimetype)
Copyright © 2002 – 2020 Project Wonder.