diff --git a/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/cascade-choice-parameter.js b/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/cascade-choice-parameter.js
new file mode 100644
index 00000000..e4e5ccb3
--- /dev/null
+++ b/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/cascade-choice-parameter.js
@@ -0,0 +1,20 @@
+if (window.makeStaplerProxy) {
+ window.__old__makeStaplerProxy = window.makeStaplerProxy;
+ window.makeStaplerProxy = UnoChoice.makeStaplerProxy2;
+}
+
+window.addEventListener("DOMContentLoaded", () => {
+ document.querySelectorAll(".cascade-choice-parameter-data-holder").forEach((dataHolder) => {
+ const { name, paramName, randomName, proxyName } = dataHolder.dataset;
+ const referencedParameters = dataHolder.dataset.referencedParameters.split(",").map((val) => val.trim());
+ const filterable = dataHolder.dataset.filterable === "true";
+ const filterLength = parseInt(dataHolder.dataset.filterLength);
+
+ UnoChoice.renderCascadeChoiceParameter(`#${paramName}`, filterable, name, randomName, filterLength, paramName, referencedParameters, window[proxyName]);
+ });
+
+ if (window.makeStaplerProxy && window.__old__makeStaplerProxy) {
+ window.makeStaplerProxy = window.__old__makeStaplerProxy;
+ delete window["__old__makeStaplerProxy"];
+ }
+});
diff --git a/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/index.jelly b/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/index.jelly
index 280a5184..358e9fc4 100644
--- a/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/index.jelly
+++ b/src/main/resources/org/biouno/unochoice/CascadeChoiceParameter/index.jelly
@@ -2,24 +2,15 @@
${it.parameters.clear()}
-
-
+
+
+
+
diff --git a/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js b/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js
new file mode 100644
index 00000000..c5fc20ef
--- /dev/null
+++ b/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js
@@ -0,0 +1,28 @@
+if (window.makeStaplerProxy) {
+ window.__old__makeStaplerProxy = window.makeStaplerProxy;
+ window.makeStaplerProxy = UnoChoice.makeStaplerProxy2;
+}
+
+window.addEventListener("DOMContentLoaded", () => {
+ document.querySelectorAll(".dynamic-reference-parameter-data-holder").forEach((dataHolder) => {
+ const { name, paramName, proxyName } = dataHolder.dataset;
+ const referencedParameters = dataHolder.dataset.referencedParameters.split(",").map((val) => val.trim());
+
+ UnoChoice.renderDynamicRenderParameter(`#${paramName}`, name, paramName, referencedParameters, window[proxyName]);
+
+ // update spinner id
+ var rootElmt = document.querySelector(`#${paramName}`);
+ if (rootElmt) {
+ var divElmt = rootElmt.querySelector("div");
+ if (divElmt) {
+ var spinnerId = divElmt.id.split("_").pop();
+ document.querySelector(`#${paramName}-spinner`).setAttribute("id", spinnerId + "-spinner");
+ }
+ }
+ });
+
+ if (window.makeStaplerProxy && window.__old__makeStaplerProxy) {
+ window.makeStaplerProxy = window.__old__makeStaplerProxy;
+ delete window["__old__makeStaplerProxy"];
+ }
+});
diff --git a/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/index.jelly b/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/index.jelly
index b363f24d..7f35264a 100644
--- a/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/index.jelly
+++ b/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/index.jelly
@@ -55,33 +55,12 @@
-
-
+
+
+
+
diff --git a/src/test/java/org/biouno/unochoice/jenkins_cert_2008/TestGroovyScriptXssVulnerabilities.java b/src/test/java/org/biouno/unochoice/jenkins_cert_2008/TestGroovyScriptXssVulnerabilities.java
index 15cd8cde..ebaa6e4a 100644
--- a/src/test/java/org/biouno/unochoice/jenkins_cert_2008/TestGroovyScriptXssVulnerabilities.java
+++ b/src/test/java/org/biouno/unochoice/jenkins_cert_2008/TestGroovyScriptXssVulnerabilities.java
@@ -149,7 +149,7 @@ public void testReferenceParameterXss() throws IOException, SAXException {
"random-name",
script,
DynamicReferenceParameter.ELEMENT_TYPE_FORMATTED_HTML,
- null,
+ "",
false);
project.addProperty(new ParametersDefinitionProperty(parameter));
project.save();