diff --git a/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.api b/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.api
index bba03100329..2061a0b4933 100644
--- a/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.api
+++ b/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.api
@@ -1,4 +1,4 @@
-
+
@@ -40,5 +40,6 @@
+
diff --git a/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.wo/ERAttachmentFlexibleEditor.wod b/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.wo/ERAttachmentFlexibleEditor.wod
index 6c7af1c3607..5930ba8b37c 100644
--- a/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.wo/ERAttachmentFlexibleEditor.wod
+++ b/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentFlexibleEditor.wo/ERAttachmentFlexibleEditor.wod
@@ -59,6 +59,7 @@ ERAttachmentLink : ERAttachmentLink {
attachment = viewerAttachment;
download = allowDownload;
configurationName = ^configurationName;
+ target = ^viewTarget;
}
OriginalFileName : WOString {
diff --git a/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentLink.api b/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentLink.api
index 6726018b62d..d8ce19f7537 100644
--- a/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentLink.api
+++ b/Frameworks/BusinessLogic/ERAttachment/Components/ERAttachmentLink.api
@@ -1,4 +1,4 @@
-
+
@@ -11,5 +11,6 @@
+
diff --git a/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/components/ERAttachmentLink.java b/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/components/ERAttachmentLink.java
index 7f0507b8658..b94c4584180 100644
--- a/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/components/ERAttachmentLink.java
+++ b/Frameworks/BusinessLogic/ERAttachment/Sources/er/attachment/components/ERAttachmentLink.java
@@ -16,6 +16,7 @@
import er.attachment.processors.ERAttachmentProcessor;
import er.extensions.components.ERXComponentUtilities;
import er.extensions.foundation.ERXMutableURL;
+import er.extensions.foundation.ERXStringUtilities;
/**
* ERAttachmentLink is like a WOHyperlink that points to an attachment's contents.
@@ -30,6 +31,7 @@
*/
public class ERAttachmentLink extends WODynamicGroup {
private WOAssociation _attachment;
+ private WOAssociation _target;
private WOAssociation _configurationName;
private NSMutableDictionary _associations;
private WOAssociation _download;
@@ -39,6 +41,7 @@ public ERAttachmentLink(String name, NSDictionary associa
_associations = associations.mutableClone();
_attachment = _associations.removeObjectForKey("attachment");
_download = _associations.removeObjectForKey("download");
+ _target = _associations.removeObjectForKey("target");
if (_attachment == null) {
throw new WODynamicElementCreationException(" The 'attachment' binding is required.");
}
@@ -73,6 +76,14 @@ public void appendToResponse(WOResponse response, WOContext context) {
}
response.appendContentString(attachmentUrl);
response.appendContentString("\"");
+
+ if (_target != null) {
+ String sTarget = (String) _target.valueInComponent(component);
+ if(!ERXStringUtilities.stringIsNullOrEmpty(sTarget)) {
+ response.appendContentString(" target=\"" + sTarget +"\"");
+ }
+ }
+
ERXComponentUtilities.appendHtmlAttributes(_associations, response, component);
response.appendContentString(">");
super.appendToResponse(response, context);