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 |
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
Modifier and Type | Field and Description |
---|---|
protected Logger |
log |
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
Constructor and Description |
---|
ERAttachmentFlexibleEditor(com.webobjects.appserver.WOContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowCancel() |
boolean |
allowDownload() |
void |
appendToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.appendToResponse. |
com.webobjects.eocontrol.EOEditingContext |
attachmentEC()
EOEditingContext for the uploaded attachment
|
String |
cancelButtonWrapperID()
Unique identifier for the cancel button wrapper div
|
com.webobjects.appserver.WOActionResults |
cancelEdit()
Action bound to the cancel button
|
com.webobjects.appserver.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"
|
com.webobjects.appserver.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
|
com.webobjects.eocontrol.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
|
com.webobjects.appserver.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
protected final Logger log
public ERAttachmentFlexibleEditor(com.webobjects.appserver.WOContext context)
public void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.appendToResponse.appendToResponse
in class ERXNonSynchronizingComponent
response
- to which we are appendingcontext
- context of the responsepublic com.webobjects.appserver.WOActionResults editAttachment()
public com.webobjects.appserver.WOActionResults cancelEdit()
public com.webobjects.appserver.WOActionResults uploadSucceededAction()
public com.webobjects.appserver.WOActionResults finishedAction()
public boolean showUpload()
public ERAttachment newAttachment()
public void setNewAttachment(ERAttachment a)
public com.webobjects.eocontrol.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 com.webobjects.eocontrol.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 – 2020 Project Wonder.