Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

NXP-8879: Expand variables in link when instantiating an Action

  • Loading branch information...
commit cf7c6f9714a2f5585ce14dee8802bc0542bc6f8f 1 parent cba43ca
Thierry Martins tmartins authored
9 nuxeo-platform-actions-core/src/main/java/org/nuxeo/ecm/platform/actions/Action.java
@@ -26,6 +26,7 @@
26 26 import org.nuxeo.common.xmap.annotation.XNode;
27 27 import org.nuxeo.common.xmap.annotation.XNodeList;
28 28 import org.nuxeo.common.xmap.annotation.XObject;
  29 +import org.nuxeo.runtime.api.Framework;
29 30
30 31 /**
31 32 * Descriptor for action.
@@ -42,8 +43,7 @@
42 43 @XNode("@id")
43 44 private String id = "";
44 45
45   - @XNode("@link")
46   - private String link;
  46 + private String link = null;
47 47
48 48 // XXX AT: param types still buggy, to fix eventually for optim
49 49 @XNodeList(value = "link-params/param", type = Class[].class, componentType = Class.class)
@@ -126,8 +126,11 @@ public String getLink() {
126 126 return link;
127 127 }
128 128
  129 + @XNode("@link")
129 130 public void setLink(String link) {
130   - this.link = link;
  131 + if (link != null) {
  132 + this.link = Framework.expandVars(link);
  133 + }
131 134 }
132 135
133 136 public String[] getCategories() {

0 comments on commit cf7c6f9

Please sign in to comment.
Something went wrong with that request. Please try again.