public class ERAttachmentFlexibleEditor extends ERXNonSynchronizingComponent
ERAttachmentFlexibleUpload
and ERAttachmentViewer
It provides a one stop shop for editing a to-one relationship between a masterObject and
an ERAttachment. Switching back and forth between edit and view modes is handled by ajax updates.
There is one scenario where there is the potential for an orphaned ERAttachment and associated file.
Name | Description |
---|---|
masterObject | (required) - Parent object owning the relationship to this attachment |
relationshipKey | (required) - Name of the to-one relationship to the attachment |
injectDefaultCSS | - inject the default stylesheet from the Ajax framework (defaults to true); |
id | - unique identifier for this component (generated if null) |
editorEditLabel | - label for the edit button (defaults to "Edit") |
editorEditButtonClass | - css class for the edit button (defaults to "Button ObjButton EditObjButton") |
editorCancelLabel | - label for the cancel button (defaults to "Cancel") |
editorCancelButtonClass | - css class for the cancel button (defaults to "Button ObjButton CancelObjButton") |
configurationName | - configuration name for configuring ERAttachment |
storageType | - storage type for configuring ERAttachment |
viewShowFileName | - show the attachment file name in the view mode (defaults to true) |
viewShowAttachmentLink | - if viewShowFilename is true, wrap it with an ERAttachmentLink (defaults to true) |
uploadDialogHeaderText | - the text of the upload header (defaults to "Edit Attachment") |
viewHeight | - see: {@link ERAttachmentViewer} |
viewWidth | - see: {@link ERAttachmentViewer} |
viewAllowDownload | - see: {@link ERAttachmentLink} |
uploadAllowCancel | - for the following see: {@link ERAttachmentFlexibleUpload} |
uploadFinishedFunction | uploadFinishedFunction |
uploadCancelButtonClass | uploadCancelButtonClass |
uploadCancelLabel | uploadCancelLabel |
uploadCanceledAction | uploadCanceledAction |
uploadCanceledFunction | uploadCanceledFunction |
uploadCancelingText | uploadCancelingText |
uploadClearClass | uploadClearClass |
uploadFailedAction | uploadFailedAction |
uploadFailedFunction | uploadFailedFunction |
uploadHeight | uploadHeight |
uploadWidth | uploadWidth |
uploadMimeType | uploadMimeType |
uploadOwnerID | uploadOwnerID |
uploadRefreshTime | uploadRefreshTime |
uploadSelectFileButtonClass | uploadSelectFileButtonClass |
uploadSelectFileLabel | uploadSelectFileLabel |
uploadStartedFunction | uploadStartedFunction |
Name | Description |
---|---|
er.attachment.[configurationName].tempFolder | (optional) the temp folder to use for WOFileUploads |
er.attachment.tempFolder | (optional) the temp folder to use for WOFileUploads |
er.attachment.[configurationName].storageType | er.attachment.[configurationName].storageType |
er.attachment.storageType | er.attachment.storageType |
er.attachment.[configurationName].width | er.attachment.[configurationName].width |
er.attachment.width | er.attachment.width |
er.attachment.[configurationName].height | er.attachment.[configurationName].height |
er.attachment.height | er.attachment.height |
Modifier and Type | Class and Description |
---|---|
static interface |
ERAttachmentFlexibleEditor.Keys |
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
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
log |
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
_CLASS
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
NullValue
_CLASS
Constructor and Description |
---|
ERAttachmentFlexibleEditor(WOContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowCancel() |
boolean |
allowDownload() |
void |
appendToResponse(WOResponse response,
WOContext context)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.appendToResponse. |
EOEditingContext |
attachmentEC()
EOEditingContext for the uploaded attachment
|
String |
cancelButtonWrapperID()
Unique identifier for the cancel button wrapper div
|
WOActionResults |
cancelEdit()
Action bound to the cancel button
|
WOActionResults |
editAttachment()
Action bound to the edit button
|
String |
editorCancelButtonClass()
The css class for the main cancel button
Defaults to "Button ObjButton CancelObjButton"
|
String |
editorCancelLabel()
The label for the main cancel button
Defaults to "Cancel"
|
String |
editorEditButtonClass()
The css class for the main edit button
Defaults to "Button ObjButton EditObjButton"
|
String |
editorEditLabel()
The label for the main edit button
Defaults to "Edit"
|
WOActionResults |
finishedAction() |
String |
id()
Base unique identifier, used to create the other id's in the component
|
boolean |
injectDefaultCSS()
Should the component inject the default css in the head of the page
|
EOEnterpriseObject |
masterObject()
Getter for the masterObject
|
ERAttachment |
newAttachment() |
String |
refreshContainerFunction()
Function to update the main update container
|
String |
relationshipKey()
Getter for the relationhipKey
|
void |
setNewAttachment(ERAttachment a) |
boolean |
showFileName()
Controls whether the file name should be displayed
Defaults to true
|
boolean |
showLink()
Controls whether the file name should be shown as a link
Defaults to true
|
boolean |
showUpload()
Controls whether the upload component is shown
|
String |
startedFunction()
Function called when the upload starts
|
String |
updateContainerID()
Unique identifier for the main update container
|
String |
uploadCancelLabel()
The label to apply to the upload components cancel button
Defaults to "Cancel Upload"
|
String |
uploadDialogHeaderText()
The text to display in the header of the edit box
|
String |
uploadFinishedFunction()
Function called when the upload finishes
|
WOActionResults |
uploadSucceededAction()
Action called when an upload succeeds
|
ERAttachment |
viewerAttachment()
The masterObject's attachment
|
invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, 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 ERAttachmentFlexibleEditor(WOContext context)
public void appendToResponse(WOResponse response, WOContext context)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.appendToResponse.appendToResponse
in class ERXNonSynchronizingComponent
response
- to which we are appendingcontext
- context of the responsepublic WOActionResults editAttachment()
public WOActionResults cancelEdit()
public WOActionResults uploadSucceededAction()
public WOActionResults finishedAction()
public boolean showUpload()
public ERAttachment newAttachment()
public void setNewAttachment(ERAttachment a)
public EOEditingContext attachmentEC()
public boolean allowCancel()
public String uploadCancelLabel()
public ERAttachment viewerAttachment()
public boolean showFileName()
public boolean showLink()
public boolean allowDownload()
public String editorEditButtonClass()
public String editorCancelButtonClass()
public String editorEditLabel()
public String editorCancelLabel()
public String uploadDialogHeaderText()
public EOEnterpriseObject masterObject()
public String relationshipKey()
public boolean injectDefaultCSS()
public String id()
public String updateContainerID()
public String cancelButtonWrapperID()
public String refreshContainerFunction()
public String uploadFinishedFunction()
public String startedFunction()
Copyright © 2002 – 2024 Project Wonder.