|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.extensions.components.ERXComponent
er.extensions.components.ERXNonSynchronizingComponent
er.attachment.components.ERAttachmentFlexibleEditor
public class ERAttachmentFlexibleEditor
ERAttachmentFlexibleEditor is a wrapper around 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. 1. User lands on an edit page for the masterObject 2. User selects and successfully uploads a file for the attachment 3. User leaves the masterObject edit page without saving changes
Bindings | |
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 |
Properties | |
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 |
Nested Class Summary | |
---|---|
static interface |
ERAttachmentFlexibleEditor.Keys
|
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
---|
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
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.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
---|
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 |
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
log
|
Fields inherited from class er.extensions.components.ERXComponent |
---|
_dynamicBindings |
Fields inherited from class com.webobjects.appserver.WOComponent |
---|
_Extension, _IsEventLoggingEnabled, _keyAssociations |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
---|
_CLASS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
NullValue |
Fields inherited from interface com.webobjects.foundation.NSValidation |
---|
_CLASS |
Constructor Summary | |
---|---|
ERAttachmentFlexibleEditor(com.webobjects.appserver.WOContext context)
|
Method Summary | |
---|---|
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()
Local peer EOEditingContext for the uploaded attachment |
java.lang.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 |
java.lang.String |
editorCancelButtonClass()
The css class for the main cancel button Defaults to "Button ObjButton CancelObjButton" |
java.lang.String |
editorCancelLabel()
The label for the main cancel button Defaults to "Cancel" |
java.lang.String |
editorEditButtonClass()
The css class for the main edit button Defaults to "Button ObjButton EditObjButton" |
java.lang.String |
editorEditLabel()
The label for the main edit button Defaults to "Edit" |
com.webobjects.appserver.WOActionResults |
finishedAction()
|
java.lang.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 |
localParent()
Convenience accessor, returns a local instance of the masterObject in the workingEC |
com.webobjects.eocontrol.EOEnterpriseObject |
masterObject()
Getter for the masterObject |
ERAttachment |
newAttachment()
|
java.lang.String |
refreshContainerFunction()
Function to update the main update container |
java.lang.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 |
java.lang.String |
startedFunction()
Function called when the upload starts |
java.lang.String |
updateContainerID()
Unique identifier for the main update container |
java.lang.String |
uploadCancelLabel()
The label to apply to the upload components cancel button Defaults to "Cancel Upload" |
java.lang.String |
uploadDialogHeaderText()
The text to display in the header of the edit box |
java.lang.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 |
com.webobjects.eocontrol.EOEditingContext |
workingEC()
Local child editing context of the masterObject for building the relationship |
Methods inherited from class er.extensions.components.ERXNonSynchronizingComponent |
---|
invokeAction, isStateless, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest |
Methods inherited from class com.webobjects.appserver.WOComponent |
---|
_associationWithName, _childTemplate, _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, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final org.apache.log4j.Logger log
Constructor Detail |
---|
public ERAttachmentFlexibleEditor(com.webobjects.appserver.WOContext context)
Method Detail |
---|
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 com.webobjects.eocontrol.EOEditingContext workingEC()
public com.webobjects.eocontrol.EOEnterpriseObject localParent()
public boolean allowCancel()
public java.lang.String uploadCancelLabel()
public ERAttachment viewerAttachment()
public boolean showFileName()
public boolean showLink()
public boolean allowDownload()
public java.lang.String editorEditButtonClass()
public java.lang.String editorCancelButtonClass()
public java.lang.String editorEditLabel()
public java.lang.String editorCancelLabel()
public java.lang.String uploadDialogHeaderText()
public com.webobjects.eocontrol.EOEnterpriseObject masterObject()
public java.lang.String relationshipKey()
public boolean injectDefaultCSS()
public java.lang.String id()
public java.lang.String updateContainerID()
public java.lang.String cancelButtonWrapperID()
public java.lang.String refreshContainerFunction()
public java.lang.String uploadFinishedFunction()
public java.lang.String startedFunction()
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |