This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/main by this push:
     new a91460ab2 WW-5772 Remove inline event handlers from 
optiontransferselect, inputtransferselect, updownselect and combobox (#2012)
a91460ab2 is described below

commit a91460ab2f6e3944cd2f8d99c8e2514cfd28eb28
Author: aeon <[email protected]>
AuthorDate: Thu Oct 15 03:09:03 2026 -0400

    WW-5772 Remove inline event handlers from optiontransferselect, 
inputtransferselect, updownselect and combobox (#2012)
    
    * WW-5772 Bind transfer-select buttons from data attributes instead of 
inline onclick
    
    The optiontransferselect, inputtransferselect and updownselect tags
    rendered every button with a framework-generated onclick handler that
    built a JavaScript call from the select ids and the headerKey /
    doubleHeaderKey tag attributes. Pages using these tags therefore needed
    'unsafe-inline' in their Content-Security-Policy.
    
    Each button now carries its action, target select ids and header keys
    in data-* attributes, and optiontransferselect.js / inputtransferselect.js
    register one delegated click listener per page (capture phase) that
    calls the same functions with the same arguments as before. A
    developer-supplied *Onclick attribute on optiontransferselect is still
    rendered as onclick and still runs after the framework action.
    
    The rendered markup now depends on the matching static JS: an
    application that serves its own copy of optiontransferselect.js or
    inputtransferselect.js through struts.ui.staticContentPath must update
    it together with the templates.
    
    Generated-by: an AI coding assistant; reviewed and tested by the author.
    
    * WW-5772 Bind combobox select change handler from a nonce'd script
    
    The combobox tag (simple and html5 themes) rendered its select with an
    inline onChange="autoPopulate_<id>(this)" handler. The select now
    carries data-struts-combobox="<escapedId>" and the handler is attached
    with addEventListener inside an <@s.script> block, which carries the
    CSP nonce like the autoPopulate function the template already emits.
    
    The script binds every select with its marker that is not bound yet,
    so comboboxes repeated with the same generated id, for example inside
    an iterator, each get exactly one handler, as they did with the inline
    attribute. It looks the selects up instead of using
    document.currentScript, so it also works when the fragment is loaded
    over AJAX and its scripts are evaluated after insertion (jQuery .html()
    evaluates them through a temporary script element in <head>).
    
    Generated-by: an AI coding assistant; reviewed and tested by the author.
    
    ---------
    
    Co-authored-by: Aaron Elijah Mars 
<[email protected]>
---
 .../apache/struts2/static/inputtransferselect.js   |  43 ++++++
 .../apache/struts2/static/optiontransferselect.js  |  93 ++++++++++++
 .../src/main/resources/template/html5/combobox.ftl |  15 +-
 .../main/resources/template/simple/combobox.ftl    |  15 +-
 .../template/simple/inputtransferselect.ftl        |  16 +-
 .../template/simple/optiontransferselect.ftl       | 165 +++++++--------------
 .../resources/template/simple/updownselect.ftl     |  12 +-
 .../views/jsp/ui/OptionTransferSelectTagTest.java  |  28 ++++
 .../struts2/views/jsp/ui/UpDownSelectTagTest.java  |  18 +++
 .../org/apache/struts2/views/jsp/ui/ComboBox-1.txt |  15 +-
 .../org/apache/struts2/views/jsp/ui/ComboBox-2.txt |  15 +-
 .../org/apache/struts2/views/jsp/ui/ComboBox-3.txt |  15 +-
 .../org/apache/struts2/views/jsp/ui/ComboBox-4.txt |  15 +-
 .../org/apache/struts2/views/jsp/ui/Formtag-11.txt |   6 +-
 .../org/apache/struts2/views/jsp/ui/Formtag-2.txt  |   6 +-
 .../org/apache/struts2/views/jsp/ui/Formtag-22.txt |   6 +-
 .../org/apache/struts2/views/jsp/ui/Formtag-24.txt |   6 +-
 .../org/apache/struts2/views/jsp/ui/Formtag-6.txt  |   6 +-
 .../struts2/views/jsp/ui/inputtransferselect-1.txt |  10 +-
 .../struts2/views/jsp/ui/inputtransferselect-2.txt |  10 +-
 .../views/jsp/ui/optiontransferselect-1.txt        |  18 +--
 .../views/jsp/ui/optiontransferselect-2.txt        |  18 +--
 .../views/jsp/ui/optiontransferselect-3.txt        |  18 +--
 .../views/jsp/ui/optiontransferselect-4.txt        |  18 +--
 .../views/jsp/ui/optiontransferselect-5.txt        |  18 +--
 .../views/jsp/ui/optiontransferselect-6.txt        |  18 +--
 .../views/jsp/ui/optiontransferselect-7.txt        |  12 +-
 .../views/jsp/ui/optiontransferselect-8.txt        |  18 +--
 .../struts2/views/jsp/ui/updownselecttag-1.txt     |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-10.txt    |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-11.txt    |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-2.txt     |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-3.txt     |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-4.txt     |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-5.txt     |   6 +-
 .../struts2/views/jsp/ui/updownselecttag-6.txt     |   4 +-
 .../struts2/views/jsp/ui/updownselecttag-7.txt     |   4 +-
 .../struts2/views/jsp/ui/updownselecttag-8.txt     |   4 +-
 .../struts2/views/jsp/ui/updownselecttag-9.txt     |   6 +-
 39 files changed, 455 insertions(+), 258 deletions(-)

diff --git 
a/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js 
b/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js
index 80e5a270f..36f70b71f 100644
--- a/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js
+++ b/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js
@@ -133,3 +133,46 @@ function swapOptions(objTargetElement, first, second) {
     opt[first] = temp2;
     opt[second] = temp;
 }
+
+/*
+ * Buttons rendered by the inputtransferselect tag carry their action and 
target select id in data-* attributes
+ * instead of inline onclick handlers, so the tag works under a 
Content-Security-Policy without 'unsafe-inline':
+ *   data-struts-inputtransferselect="add|remove|removeAll|moveUp|moveDown", 
data-struts-target, optional
+ *   data-struts-header-key
+ * The listener is registered once per page, in the capture phase, so it is 
not stopped by an ancestor's
+ * stopPropagation().
+ */
+(function () {
+    if (window.strutsInputTransferSelectListener) {
+        return;
+    }
+    window.strutsInputTransferSelectListener = true;
+
+    document.addEventListener('click', function (event) {
+        var button = event.target;
+        if (!button || !button.getAttribute) {
+            return;
+        }
+        var action = button.getAttribute('data-struts-inputtransferselect');
+        if (!action) {
+            return;
+        }
+        var targetId = button.getAttribute('data-struts-target');
+        var target = document.getElementById(targetId);
+        if (!target) {
+            return;
+        }
+        var headerKey = button.getAttribute('data-struts-header-key') || '';
+        if (action === 'add') {
+            addOption(document.getElementById(targetId + '_input'), target);
+        } else if (action === 'remove') {
+            removeOptions(target);
+        } else if (action === 'removeAll') {
+            removeAllOptions(target);
+        } else if (action === 'moveUp') {
+            moveOptionUp(target, 'key', headerKey);
+        } else if (action === 'moveDown') {
+            moveOptionDown(target, 'key', headerKey);
+        }
+    }, true);
+})();
diff --git 
a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js 
b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
index 681450b7b..a9d91312f 100644
--- a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
+++ b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js
@@ -189,3 +189,96 @@ function swapOptions(objTargetElement, first, second) {
     opt[first] = temp2;
     opt[second] = temp;
 }
+
+/*
+ * Buttons rendered by the optiontransferselect and updownselect tags carry 
their action, target select ids and header
+ * keys in data-* attributes instead of inline onclick handlers, so the tags 
work under a Content-Security-Policy
+ * without 'unsafe-inline':
+ *   data-struts-updownselect="moveUp|moveDown|selectAll", data-struts-target, 
optional data-struts-header-key
+ *   
data-struts-optiontransferselect="leftUp|leftDown|rightUp|rightDown|addToLeft|addToRight|addAllToLeft|
+ *     addAllToRight|selectAll", data-struts-left, data-struts-right, optional 
data-struts-header-key and
+ *     data-struts-double-header-key
+ * The listener is registered once per page, in the capture phase, so the 
framework action still runs before a
+ * developer-supplied onclick attribute on the same button and is not stopped 
by an ancestor's stopPropagation().
+ */
+(function () {
+    if (window.strutsOptionTransferSelectListener) {
+        return;
+    }
+    window.strutsOptionTransferSelectListener = true;
+
+    function headerKey(button, name) {
+        return button.hasAttribute(name) ? button.getAttribute(name) : 
undefined;
+    }
+
+    function selectAll(target, key) {
+        if (key === undefined) {
+            selectAllOptions(target);
+        } else {
+            selectAllOptionsExceptSome(target, 'key', key);
+        }
+    }
+
+    function transfer(move, source, target, key) {
+        if (key === undefined) {
+            move(source, target, false, '');
+        } else {
+            move(source, target, false, key, '');
+        }
+    }
+
+    function updownselect(button, action) {
+        var target = 
document.getElementById(button.getAttribute('data-struts-target'));
+        var key = headerKey(button, 'data-struts-header-key');
+        if (action === 'moveUp') {
+            moveOptionUp(target, 'key', key === undefined ? '' : key);
+        } else if (action === 'moveDown') {
+            moveOptionDown(target, 'key', key === undefined ? '' : key);
+        } else if (action === 'selectAll') {
+            selectAll(target, key);
+        }
+    }
+
+    function optiontransferselect(button, action) {
+        var left = 
document.getElementById(button.getAttribute('data-struts-left'));
+        var right = 
document.getElementById(button.getAttribute('data-struts-right'));
+        var leftKey = headerKey(button, 'data-struts-header-key');
+        var rightKey = headerKey(button, 'data-struts-double-header-key');
+        if (action === 'leftDown') {
+            moveOptionDown(left, 'key', leftKey === undefined ? '' : leftKey);
+        } else if (action === 'leftUp') {
+            moveOptionUp(left, 'key', leftKey === undefined ? '' : leftKey);
+        } else if (action === 'rightDown') {
+            moveOptionDown(right, 'key', rightKey === undefined ? '' : 
rightKey);
+        } else if (action === 'rightUp') {
+            moveOptionUp(right, 'key', rightKey === undefined ? '' : rightKey);
+        } else if (action === 'addToLeft') {
+            transfer(moveSelectedOptions, right, left, rightKey);
+        } else if (action === 'addToRight') {
+            transfer(moveSelectedOptions, left, right, leftKey);
+        } else if (action === 'addAllToLeft') {
+            transfer(moveAllOptions, right, left, rightKey);
+        } else if (action === 'addAllToRight') {
+            transfer(moveAllOptions, left, right, leftKey);
+        } else if (action === 'selectAll') {
+            selectAll(left, leftKey);
+            selectAll(right, rightKey);
+        }
+    }
+
+    document.addEventListener('click', function (event) {
+        var button = event.target;
+        if (!button || !button.getAttribute) {
+            return;
+        }
+        var action = button.getAttribute('data-struts-updownselect');
+        if (action) {
+            updownselect(button, action);
+            return;
+        }
+        action = button.getAttribute('data-struts-optiontransferselect');
+        if (action) {
+            optiontransferselect(button, action);
+        }
+    }, true);
+})();
diff --git a/core/src/main/resources/template/html5/combobox.ftl 
b/core/src/main/resources/template/html5/combobox.ftl
index 2ef917f78..dedda39d6 100644
--- a/core/src/main/resources/template/html5/combobox.ftl
+++ b/core/src/main/resources/template/html5/combobox.ftl
@@ -37,7 +37,7 @@ function autoPopulate_${attributes.escapedId}(targetElement) {
 
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" />
 <#if attributes.list??>
-<select onChange="autoPopulate_${attributes.escapedId}(this);"<#rt/>
+<select data-struts-combobox="${attributes.escapedId}"<#rt/>
  <#include "/${attributes.templateDir}/${attributes.expandTheme}/css.ftl" 
/><#rt/>
 <#if attributes.disabled!false>
  disabled="disabled"<#rt/>
@@ -97,5 +97,18 @@ function autoPopulate_${attributes.escapedId}(targetElement) 
{
 >${tmpListValue}</option><#rt/>
 </@s.iterator>
 </select><#rt/>
+<@s.script>
+       (function () {
+               var selects = 
document.querySelectorAll('select[data-struts-combobox="${attributes.escapedId}"]');
+               for (var i = 0; i < selects.length; i++) {
+                       if (!selects[i].strutsComboboxBound) {
+                               selects[i].strutsComboboxBound = true;
+                               selects[i].addEventListener('change', function 
() {
+                                       
autoPopulate_${attributes.escapedId}(this);
+                               });
+                       }
+               }
+       })();
+</@s.script>
 </#if>
 <#include 
"/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" 
/><#rt/>
diff --git a/core/src/main/resources/template/simple/combobox.ftl 
b/core/src/main/resources/template/simple/combobox.ftl
index 400ae450d..ca17e4a05 100644
--- a/core/src/main/resources/template/simple/combobox.ftl
+++ b/core/src/main/resources/template/simple/combobox.ftl
@@ -36,7 +36,7 @@
 <#include "/${attributes.templateDir}/simple/text.ftl" />
 <br />
 <#if attributes.list??>
-<select onChange="autoPopulate_${attributes.escapedId}(this);"<#rt/>
+<select data-struts-combobox="${attributes.escapedId}"<#rt/>
 <#include "/${attributes.templateDir}/${attributes.expandTheme}/css.ftl" />
     <#if attributes.disabled!false>
  disabled="disabled"<#rt/>
@@ -98,4 +98,17 @@
     </option><#lt/>
     </@s.iterator>
 </select>
+<@s.script>
+       (function () {
+               var selects = 
document.querySelectorAll('select[data-struts-combobox="${attributes.escapedId}"]');
+               for (var i = 0; i < selects.length; i++) {
+                       if (!selects[i].strutsComboboxBound) {
+                               selects[i].strutsComboboxBound = true;
+                               selects[i].addEventListener('change', function 
() {
+                                       
autoPopulate_${attributes.escapedId}(this);
+                               });
+                       }
+               }
+       })();
+</@s.script>
 </#if>
diff --git a/core/src/main/resources/template/simple/inputtransferselect.ftl 
b/core/src/main/resources/template/simple/inputtransferselect.ftl
index c0ff17a14..90f124d2e 100644
--- a/core/src/main/resources/template/simple/inputtransferselect.ftl
+++ b/core/src/main/resources/template/simple/inputtransferselect.ftl
@@ -69,7 +69,7 @@
                <#if attributes.buttonCssStyle?has_content>
                 style="${attributes.buttonCssStyle}"
                </#if><#t/>
-                value="${addLabel}" 
onclick="addOption(document.getElementById('${attributes.id}_input'), 
document.getElementById('${attributes.id}'))" /><br /><br />
+                value="${addLabel}" data-struts-inputtransferselect="add" 
data-struts-target="${attributes.id}" /><br /><br />
        <#t/>
        <#assign removeLabel=(attributes.removeLabel!"<-") /><#t/>
        <input type="button"
@@ -79,7 +79,7 @@
                <#if attributes.buttonCssStyle?has_content>
                 style="${attributes.buttonCssStyle}"
                </#if><#t/>
-                value="${removeLabel}" 
onclick="removeOptions(document.getElementById('${attributes.id}'))" /><br 
/><br />
+                value="${removeLabel}" 
data-struts-inputtransferselect="remove" data-struts-target="${attributes.id}" 
/><br /><br />
        <#t/>
        <#assign removeAllLabel=(attributes.removeAllLabel!"<<--") /><#t/>
        <input type="button"
@@ -89,7 +89,7 @@
                <#if attributes.buttonCssStyle?has_content>
                 style="${attributes.buttonCssStyle}"
                </#if><#t/>
-                value="${removeAllLabel}" 
onclick="removeAllOptions(document.getElementById('${attributes.id}'))" /><br 
/><br />
+                value="${removeAllLabel}" 
data-struts-inputtransferselect="removeAll" 
data-struts-target="${attributes.id}" /><br /><br />
 </td>
 <td>
 <#if attributes.rightTitle?has_content><#t/>
@@ -99,20 +99,18 @@
 <#include "/${attributes.templateDir}/simple/select.ftl" />
 <#if attributes.allowUpDown!true>
 <input type="button"
+       data-struts-inputtransferselect="moveDown" 
data-struts-target="${attributes.id}"
 <#if attributes.headerKey?has_content>
-       onclick="moveOptionDown(document.getElementById('${attributes.id}'), 
'key', '${attributes.headerKey}');"
-<#else>
-       onclick="moveOptionDown(document.getElementById('${attributes.id}'), 
'key', '');"
+       data-struts-header-key="${attributes.headerKey}"
 </#if>
 <#if attributes.downLabel?has_content>
        value="${attributes.downLabel}"
 </#if>
 />
 <input type="button"
+       data-struts-inputtransferselect="moveUp" 
data-struts-target="${attributes.id}"
 <#if attributes.headerKey?has_content>
-       onclick="moveOptionUp(document.getElementById('${attributes.id}'), 
'key', '${attributes.headerKey}');"
-<#else>
-       onclick="moveOptionUp(document.getElementById('${attributes.id}'), 
'key', '');"
+       data-struts-header-key="${attributes.headerKey}"
 </#if>
 <#if attributes.upLabel?has_content>
        value="${attributes.upLabel}"
diff --git a/core/src/main/resources/template/simple/optiontransferselect.ftl 
b/core/src/main/resources/template/simple/optiontransferselect.ftl
index abf920cd8..28d1fdec0 100644
--- a/core/src/main/resources/template/simple/optiontransferselect.ftl
+++ b/core/src/main/resources/template/simple/optiontransferselect.ftl
@@ -22,6 +22,18 @@
        <@s.script 
src="${base}${attributes.staticContentPath}/optiontransferselect.js" />
        <#assign temporaryVariable = 
stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
 </#if><#t/>
+<#--
+  Buttons carry their action, both select ids and the header keys in data-* 
attributes; optiontransferselect.js binds
+  them, so the tag needs no framework-generated inline JavaScript under a 
Content-Security-Policy. A developer-supplied
+  *Onclick attribute is still rendered as onclick and runs after the framework 
action. The attribute line uses <#rt/>,
+  not <#t/>, to keep the space that separates it from the preceding attribute.
+-->
+<#macro transferButton action onclick><#t/>
+ data-struts-optiontransferselect="${action}" 
data-struts-left="${attributes.id}" 
data-struts-right="${attributes.doubleId!}"<#rt/>
+<#if attributes.headerKey??> 
data-struts-header-key="${attributes.headerKey}"</#if><#t/>
+<#if attributes.doubleHeaderKey??> 
data-struts-double-header-key="${attributes.doubleHeaderKey}"</#if><#t/>
+<#if onclick?has_content> onclick="<#outputformat 
'JavaScript'>${onclick}</#outputformat>;"</#if><#t/>
+</#macro>
 <table>
 <tr>
 <td>
@@ -32,13 +44,13 @@
 <#include "/${attributes.templateDir}/simple/select.ftl" />
 <#if attributes.allowUpDownOnLeft!true>
 <input type="button"
-       onclick="moveOptionDown(document.getElementById('${attributes.id}'), 
'key', <#if 
attributes.headerKey??>'${attributes.headerKey}'<#else>''</#if>);<#if 
attributes.upDownOnLeftOnclick?has_content><#outputformat 
'JavaScript'>${attributes.upDownOnLeftOnclick}</#outputformat>;</#if>"
+       <@transferButton action="leftDown" 
onclick=attributes.upDownOnLeftOnclick!""/>
 <#if attributes.leftDownLabel??>
        value="${attributes.leftDownLabel}"
 </#if>
 />
 <input type="button"
-       onclick="moveOptionUp(document.getElementById('${attributes.id}'), 
'key', <#if 
attributes.headerKey??>'${attributes.headerKey}'<#else>''</#if>);<#if 
attributes.upDownOnLeftOnclick?has_content><#outputformat 
'JavaScript'>${attributes.upDownOnLeftOnclick}</#outputformat>;</#if>"
+       <@transferButton action="leftUp" 
onclick=attributes.upDownOnLeftOnclick!""/>
 <#if attributes.leftUpLabel??>
        value="${attributes.leftUpLabel}"
 </#if>
@@ -48,132 +60,59 @@
 </td>
 <td class="tdTransferSelect">
        <#if attributes.allowAddToLeft!true><#t/>
-               <#assign addToLeftLabel = attributes.addToLeftLabel!"<-"/><#t/>
-               <#if attributes.doubleHeaderKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addToLeftLabel}" 
onclick="moveSelectedOptions(document.getElementById('${attributes.doubleId}'), 
document.getElementById('${attributes.id}'), false, 
'${attributes.doubleHeaderKey}', '');<#if 
attributes.addToLeftOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addToLeftOnclick}</#outputformat>;</#if>" /><br /><br 
/>
-               <#else><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addToLeftLabel}" 
onclick="moveSelectedOptions(document.getElementById('${attributes.doubleId}'), 
document.getElementById('${attributes.id}'), false, '');<#if 
attributes.addToLeftOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addToLeftOnclick}</#outputformat>;</#if>" /><br /><br 
/>
+               <#assign addToLeftLabel=attributes.addToLeftLabel!"<-" /><#t/>
+               <input type="button"
+               <#if attributes.buttonCssClass??><#t/>
+                class="${attributes.buttonCssClass}"
                </#if><#t/>
+               <#if attributes.buttonCssStyle??><#t/>
+                style="${attributes.buttonCssStyle}"
+               </#if><#t/>
+                value="${addToLeftLabel}"<@transferButton action="addToLeft" 
onclick=attributes.addToLeftOnclick!""/> /><br /><br />
        </#if><#t/>
        <#if attributes.allowAddToRight!true><#t/>
                <#assign addToRightLabel=attributes.addToRightLabel!"->" /><#t/>
-               <#if attributes.headerKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addToRightLabel}" 
onclick="moveSelectedOptions(document.getElementById('${attributes.id}'), 
document.getElementById('${attributes.doubleId}'), false, 
'${attributes.headerKey}', '');<#if 
attributes.addToRightOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addToRightOnclick}</#outputformat>;</#if>" /><br 
/><br />
-               <#else><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addToRightLabel}" 
onclick="moveSelectedOptions(document.getElementById('${attributes.id}'), 
document.getElementById('${attributes.doubleId}'), false, '');<#if 
attributes.addToRightOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addToRightOnclick}</#outputformat>;</#if>" /><br 
/><br />
+               <input type="button"
+               <#if attributes.buttonCssClass??><#t/>
+                class="${attributes.buttonCssClass}"
+               </#if><#t/>
+               <#if attributes.buttonCssStyle??><#t/>
+                style="${attributes.buttonCssStyle}"
                </#if><#t/>
+                value="${addToRightLabel}"<@transferButton action="addToRight" 
onclick=attributes.addToRightOnclick!""/> /><br /><br />
        </#if><#t/>
        <#if attributes.allowAddAllToLeft!true><#t/>
                <#assign addAllToLeftLabel=attributes.addAllToLeftLabel!"<<--" 
/><#t/>
-               <#if attributes.doubleHeaderKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addAllToLeftLabel}" 
onclick="moveAllOptions(document.getElementById('${attributes.doubleId}'), 
document.getElementById('${attributes.id}'), false, 
'${attributes.doubleHeaderKey}', '');<#if 
attributes.addAllToLeftOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addAllToLeftOnclick}</#outputformat>;</#if>" /><br 
/><br />
-               <#else><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addAllToLeftLabel}" 
onclick="moveAllOptions(document.getElementById('${attributes.doubleId}'), 
document.getElementById('${attributes.id}'), false, '');<#if 
attributes.addAllToLeftOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addAllToLeftOnclick}</#outputformat>;</#if>" /><br 
/><br />
+               <input type="button"
+               <#if attributes.buttonCssClass??><#t/>
+                class="${attributes.buttonCssClass}"
                </#if><#t/>
+               <#if attributes.buttonCssStyle??><#t/>
+                style="${attributes.buttonCssStyle}"
+               </#if><#t/>
+                value="${addAllToLeftLabel}"<@transferButton 
action="addAllToLeft" onclick=attributes.addAllToLeftOnclick!""/> /><br /><br />
        </#if><#t/>
        <#if attributes.allowAddAllToRight!true><#t/>
                <#assign 
addAllToRightLabel=attributes.addAllToRightLabel!"-->>" /><#t/>
-               <#if attributes.headerKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addAllToRightLabel}" 
onclick="moveAllOptions(document.getElementById('${attributes.id}'), 
document.getElementById('${attributes.doubleId}'), false, 
'${attributes.headerKey}', '');<#if 
attributes.addAllToRightOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addAllToRightOnclick}</#outputformat>;</#if>" /><br 
/><br />
-               <#else><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${addAllToRightLabel}" 
onclick="moveAllOptions(document.getElementById('${attributes.id}'), 
document.getElementById('${attributes.doubleId}'), false, '');<#if 
attributes.addAllToRightOnclick?has_content><#outputformat 
'JavaScript'>${attributes.addAllToRightOnclick}</#outputformat>;</#if>" /><br 
/><br />
+               <input type="button"
+               <#if attributes.buttonCssClass??><#t/>
+                class="${attributes.buttonCssClass}"
+               </#if><#t/>
+               <#if attributes.buttonCssStyle??><#t/>
+                style="${attributes.buttonCssStyle}"
                </#if><#t/>
+                value="${addAllToRightLabel}"<@transferButton 
action="addAllToRight" onclick=attributes.addAllToRightOnclick!""/> /><br /><br 
/>
        </#if><#t/>
        <#if attributes.allowSelectAll!true><#t/>
                <#assign selectAllLabel=attributes.selectAllLabel!"<*>" /><#t/>
-               <#if attributes.headerKey?? && 
attributes.doubleHeaderKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${selectAllLabel}" 
onclick="selectAllOptionsExceptSome(document.getElementById('${attributes.id}'),
 'key', 
'${attributes.headerKey}');selectAllOptionsExceptSome(document.getElementById('${attributes.doubleId}'),
 'key', '${attributes.doubleHeaderKey}');<#if 
attributes.selectAllOnclick?has_content><#outputformat 
'JavaScript'>${attributes.selectAllOnclick}</#outputformat>;</#if>" /><br /><br 
/>
-               <#elseif attributes.headerKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${selectAllLabel}" 
onclick="selectAllOptionsExceptSome(document.getElementById('${attributes.id}'),
 'key', 
'${attributes.headerKey}');selectAllOptions(document.getElementById('${attributes.doubleId}'));<#if
 attributes.selectAllOnclick?has_content><#outputformat 
'JavaScript'>${attributes.selectAllOnclick}</#outputformat>;</#if>" /><br /><br 
/>
-               <#elseif attributes.doubleHeaderKey??><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${selectAllLabel}" 
onclick="selectAllOptions(document.getElementById('${attributes.id}'));selectAllOptionsExceptSome(document.getElementById('${attributes.doubleId}'),
 'key', '${attributes.doubleHeaderKey}');<#if 
attributes.selectAllOnclick?has_content><#outputformat 
'JavaScript'>${attributes.selectAllOnclick}</#outputformat>;</#if>" /><br /><br 
/>
-               <#else><#t/>
-                       <input type="button"
-                       <#if attributes.buttonCssClass??><#t/>
-                        class="${attributes.buttonCssClass}"
-                       </#if><#t/>
-                       <#if attributes.buttonCssStyle??><#t/>
-                        style="${attributes.buttonCssStyle}"
-                       </#if><#t/>
-                        value="${selectAllLabel}" 
onclick="selectAllOptions(document.getElementById('${attributes.id}'));selectAllOptions(document.getElementById('${attributes.doubleId}'));<#if
 attributes.selectAllOnclick?has_content><#outputformat 
'JavaScript'>${attributes.selectAllOnclick}</#outputformat>;</#if>" /><br /><br 
/>
+               <input type="button"
+               <#if attributes.buttonCssClass??><#t/>
+                class="${attributes.buttonCssClass}"
+               </#if><#t/>
+               <#if attributes.buttonCssStyle??><#t/>
+                style="${attributes.buttonCssStyle}"
                </#if><#t/>
+                value="${selectAllLabel}"<@transferButton action="selectAll" 
onclick=attributes.selectAllOnclick!""/> /><br /><br />
        </#if><#t/>
 </td>
 <td>
@@ -285,13 +224,13 @@
 </#if>
 <#if attributes.allowUpDownOnRight!true>
 <input type="button"
-       
onclick="moveOptionDown(document.getElementById('${attributes.doubleId}'), 
'key', <#if 
attributes.doubleHeaderKey??>'${attributes.doubleHeaderKey}'<#else>''</#if>);<#if
 attributes.upDownOnRightOnclick?has_content><#outputformat 
'JavaScript'>${attributes.upDownOnRightOnclick}</#outputformat>;</#if>"
+       <@transferButton action="rightDown" 
onclick=attributes.upDownOnRightOnclick!""/>
 <#if attributes.rightDownLabel??>
        value="${attributes.rightDownLabel}"
 </#if>
 />
 <input type="button"
-       
onclick="moveOptionUp(document.getElementById('${attributes.doubleId}'), 'key', 
<#if 
attributes.doubleHeaderKey??>'${attributes.doubleHeaderKey}'<#else>''</#if>);<#if
 attributes.upDownOnRightOnclick?has_content><#outputformat 
'JavaScript'>${attributes.upDownOnRightOnclick}</#outputformat>;</#if>"
+       <@transferButton action="rightUp" 
onclick=attributes.upDownOnRightOnclick!""/>
 <#if attributes.rightUpLabel??>
        value="${attributes.rightUpLabel}"
 </#if>
diff --git a/core/src/main/resources/template/simple/updownselect.ftl 
b/core/src/main/resources/template/simple/updownselect.ftl
index a2e652702..16431e668 100644
--- a/core/src/main/resources/template/simple/updownselect.ftl
+++ b/core/src/main/resources/template/simple/updownselect.ftl
@@ -30,25 +30,25 @@
 <#if attributes.allowMoveUp!true><#t/>
        <#assign defMoveUpLabel="${attributes.moveUpLabel!'^'}" /><#t/>
        <#if attributes.headerKey??><#t/>
-               &nbsp;<input type="button" value="${defMoveUpLabel}" 
onclick="moveOptionUp(document.getElementById('${attributes.id}'), 'key', 
'${attributes.headerKey}');" />&nbsp;
+               &nbsp;<input type="button" value="${defMoveUpLabel}" 
data-struts-updownselect="moveUp" data-struts-target="${attributes.id}" 
data-struts-header-key="${attributes.headerKey}" />&nbsp;
        <#else><#t/>
-               &nbsp;<input type="button" value="${defMoveUpLabel}" 
onclick="moveOptionUp(document.getElementById('${attributes.id}'), 'key', '');" 
/>&nbsp;
+               &nbsp;<input type="button" value="${defMoveUpLabel}" 
data-struts-updownselect="moveUp" data-struts-target="${attributes.id}" />&nbsp;
        </#if><#t/>
 </#if><#t/>
 <#if attributes.allowMoveDown!true><#t/>
        <#assign defMoveDownLabel="${attributes.moveDownLabel!'v'}" /><#t/>
        <#if attributes.headerKey??><#t/>
-               &nbsp;<input type="button" value="${defMoveDownLabel}" 
onclick="moveOptionDown(document.getElementById('${attributes.id}'), 'key', 
'${attributes.headerKey}');" />&nbsp;
+               &nbsp;<input type="button" value="${defMoveDownLabel}" 
data-struts-updownselect="moveDown" data-struts-target="${attributes.id}" 
data-struts-header-key="${attributes.headerKey}" />&nbsp;
        <#else><#t/>
-               &nbsp;<input type="button" value="${defMoveDownLabel}" 
onclick="moveOptionDown(document.getElementById('${attributes.id}'), 'key', 
'');" />&nbsp;
+               &nbsp;<input type="button" value="${defMoveDownLabel}" 
data-struts-updownselect="moveDown" data-struts-target="${attributes.id}" 
/>&nbsp;
        </#if><#t/>
 </#if><#t/>
 <#if attributes.allowSelectAll!true><#t/>
        <#assign defSelectAllLabel="${attributes.selectAllLabel!'*'}" /><#t/>
        <#if attributes.headerKey??><#t/>
-               &nbsp;<input type="button" value="${defSelectAllLabel}" 
onclick="selectAllOptionsExceptSome(document.getElementById('${attributes.id}'),
 'key', '${attributes.headerKey}');" />&nbsp;
+               &nbsp;<input type="button" value="${defSelectAllLabel}" 
data-struts-updownselect="selectAll" data-struts-target="${attributes.id}" 
data-struts-header-key="${attributes.headerKey}" />&nbsp;
        <#else><#t/>
-               &nbsp;<input type="button" value="${defSelectAllLabel}" 
onclick="selectAllOptions(document.getElementById('${attributes.id}'), 'key', 
'');" />&nbsp;
+               &nbsp;<input type="button" value="${defSelectAllLabel}" 
data-struts-updownselect="selectAll" data-struts-target="${attributes.id}" 
/>&nbsp;
        </#if><#t/>
 </#if><#t/>
 </td></tr>
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptionTransferSelectTagTest.java
 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptionTransferSelectTagTest.java
index 97338d5d5..389d6db71 100644
--- 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptionTransferSelectTagTest.java
+++ 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptionTransferSelectTagTest.java
@@ -1142,6 +1142,34 @@ public class OptionTransferSelectTagTest extends 
AbstractUITagTest {
                 strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
+    public void 
testButtonsCarryHeaderKeysAsDataAttributesWithoutInlineHandlers() throws 
Exception {
+        TestAction testaction = (TestAction) action;
+        testaction.setCollection(new ArrayList<>(List.of("Left1")));
+        testaction.setList2(new ArrayList<>(List.of("Right1")));
+
+        OptionTransferSelectTag tag = new OptionTransferSelectTag();
+        tag.setPageContext(pageContext);
+        tag.setId("id");
+        tag.setName("collection");
+        tag.setList("collection");
+        tag.setHeaderKey("it's-left");
+        tag.setHeaderValue("Left");
+        tag.setDoubleId("doubleId");
+        tag.setDoubleName("list2");
+        tag.setDoubleList("list2");
+        tag.setDoubleHeaderKey("it's-right");
+        tag.setDoubleHeaderValue("Right");
+
+        tag.doStartTag();
+        tag.doEndTag();
+
+        String output = writer.toString();
+        assertFalse("framework buttons must not need inline event handlers", 
output.contains("onclick="));
+        assertFalse("data-* attributes must be separated from the preceding 
attribute", output.contains("\"data-struts-"));
+        assertTrue(output.contains("value=\"&lt;-\" 
data-struts-optiontransferselect=\"addToLeft\" data-struts-left=\"id\" 
data-struts-right=\"doubleId\""
+                + " data-struts-header-key=\"it&#39;s-left\" 
data-struts-double-header-key=\"it&#39;s-right\""));
+    }
+
     public void testDynamicAttributes() throws Exception {
         List left = new ArrayList();
         left.add("Left1");
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/UpDownSelectTagTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/UpDownSelectTagTest.java
index dc05b54bf..1cba9bd97 100644
--- 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/UpDownSelectTagTest.java
+++ 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/UpDownSelectTagTest.java
@@ -161,6 +161,24 @@ public class UpDownSelectTagTest extends AbstractUITagTest 
{
                 strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
+    public void 
testButtonsCarryHeaderKeyAsDataAttributeWithoutInlineHandlers() throws 
Exception {
+        UpDownSelectTag tag = new UpDownSelectTag();
+        tag.setPageContext(pageContext);
+        tag.setId("myId");
+        tag.setName("myName");
+        tag.setList("myMap");
+        tag.setValue("mySelectedMapIds");
+        tag.setHeaderKey("it's-a-key");
+        tag.setHeaderValue("--- Please Order ---");
+
+        tag.doStartTag();
+        tag.doEndTag();
+
+        String output = writer.toString();
+        assertFalse("framework buttons must not need inline event handlers", 
output.contains("onclick="));
+        assertTrue(output.contains("data-struts-updownselect=\"selectAll\" 
data-struts-target=\"myId\" data-struts-header-key=\"it&#39;s-a-key\""));
+    }
+
     public void testWithHeaderAndEmptyOption_clearTagStateSet() throws 
Exception {
 
         UpDownSelectTag tag = new UpDownSelectTag();
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt
index 670f704c3..b3c6f098a 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-1.txt
@@ -7,10 +7,23 @@
        }
 </script>
 <input type="text" name="foo" value="hello" id="cb"/><br/>
-<select onChange="autoPopulate_cb(this);">
+<select data-struts-combobox="cb">
     <option value="foo">foo</option>
     <option value="bar">bar</option>
     <option value="baz">baz</option>
 </select>
+<script nonce="r4nd0m">
+    (function () {
+        var selects = 
document.querySelectorAll('select[data-struts-combobox="cb"]');
+        for (var i = 0; i < selects.length; i++) {
+            if (!selects[i].strutsComboboxBound) {
+                selects[i].strutsComboboxBound = true;
+                selects[i].addEventListener('change', function () {
+                    autoPopulate_cb(this);
+                });
+            }
+        }
+    })();
+</script>
     </td>
 </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-2.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-2.txt
index 4f908b1e7..7bea2770f 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-2.txt
@@ -13,7 +13,7 @@
        }
 </script>
 <input type="text" name="myFavouriteFruit" value="banana" 
id="myFavouriteFruit"/><br/>
-<select onChange="autoPopulate_myFavouriteFruit(this);">
+<select data-struts-combobox="myFavouriteFruit">
        <option value="-1">--- Please Select ---</option>
        <option value=""></option>
     <option value="apple">apple</option>
@@ -21,5 +21,18 @@
     <option value="pineaple">pineaple</option>
     <option value="grapes">grapes</option>
 </select>
+<script>
+    (function () {
+        var selects = 
document.querySelectorAll('select[data-struts-combobox="myFavouriteFruit"]');
+        for (var i = 0; i < selects.length; i++) {
+            if (!selects[i].strutsComboboxBound) {
+                selects[i].strutsComboboxBound = true;
+                selects[i].addEventListener('change', function () {
+                    autoPopulate_myFavouriteFruit(this);
+                });
+            }
+        }
+    })();
+</script>
     </td>
 </tr>
\ No newline at end of file
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-3.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-3.txt
index 4f908b1e7..7bea2770f 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-3.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-3.txt
@@ -13,7 +13,7 @@
        }
 </script>
 <input type="text" name="myFavouriteFruit" value="banana" 
id="myFavouriteFruit"/><br/>
-<select onChange="autoPopulate_myFavouriteFruit(this);">
+<select data-struts-combobox="myFavouriteFruit">
        <option value="-1">--- Please Select ---</option>
        <option value=""></option>
     <option value="apple">apple</option>
@@ -21,5 +21,18 @@
     <option value="pineaple">pineaple</option>
     <option value="grapes">grapes</option>
 </select>
+<script>
+    (function () {
+        var selects = 
document.querySelectorAll('select[data-struts-combobox="myFavouriteFruit"]');
+        for (var i = 0; i < selects.length; i++) {
+            if (!selects[i].strutsComboboxBound) {
+                selects[i].strutsComboboxBound = true;
+                selects[i].addEventListener('change', function () {
+                    autoPopulate_myFavouriteFruit(this);
+                });
+            }
+        }
+    })();
+</script>
     </td>
 </tr>
\ No newline at end of file
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt
index 2e925eff7..71063a4ab 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt
@@ -7,8 +7,21 @@
     }
  </script>
  <input type="text" name="foo" value="hello" 
id="cb[&#39;&quot;.&quot;&#39;]=bc(){};//"/><br/>
- <select onChange="autoPopulate_cb__________bc_______(this);">
+ <select data-struts-combobox="cb__________bc_______">
      <option value="foo">foo</option>
  </select>
+<script>
+    (function () {
+        var selects = 
document.querySelectorAll('select[data-struts-combobox="cb__________bc_______"]');
+        for (var i = 0; i < selects.length; i++) {
+            if (!selects[i].strutsComboboxBound) {
+                selects[i].strutsComboboxBound = true;
+                selects[i].addEventListener('change', function () {
+                    autoPopulate_cb__________bc_______(this);
+                });
+            }
+        }
+    })();
+</script>
      </td>
  </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
index 6098d380e..40dd8f001 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt
@@ -10,9 +10,9 @@
 <input type="hidden" id="__multiselect_testAction_myUpDownSelectTag" 
name="__multiselect_myUpDownSelectTag"value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('testAction_myUpDownSelectTag'), 
'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('testAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('testAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" 
data-struts-target="testAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" 
data-struts-target="testAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" 
data-struts-target="testAction_myUpDownSelectTag" />&nbsp;
 </td></tr>
 </table>
 </td>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
index 4a698bffb..4d2404bb0 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt
@@ -10,9 +10,9 @@
 <input type="hidden" 
id="__multiselect_doubleValidationAction_myUpDownSelectTag" 
name="__multiselect_myUpDownSelectTag"value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
 </td></tr>
 </table>
 </td>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
index bb5ebea3d..90c8293b9 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-22.txt
@@ -10,9 +10,9 @@
 <input type="hidden" 
id="__multiselect_doubleValidationAction_myUpDownSelectTag" 
name="__multiselect_myUpDownSelectTag"value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
 </td></tr>
 </table>
 </td>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
index f63d81d2d..1af874b6b 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-24.txt
@@ -10,9 +10,9 @@
 <input type="hidden" 
id="__multiselect_doubleValidationAction_myUpDownSelectTag" 
name="__multiselect_myUpDownSelectTag"value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('doubleValidationAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" 
data-struts-target="doubleValidationAction_myUpDownSelectTag" />&nbsp;
 </td></tr>
 </table>
 </td>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt
index 859c79a6f..cb74c99de 100644
--- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt
@@ -9,9 +9,9 @@
 <input type="hidden" id="__multiselect_myAction_myUpDownSelectTag" 
name="__multiselect_myUpDownSelectTag"value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myAction_myUpDownSelectTag'), 
'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myAction_myUpDownSelectTag'), 
'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myAction_myUpDownSelectTag'),
 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" 
data-struts-target="myAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" 
data-struts-target="myAction_myUpDownSelectTag" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" 
data-struts-target="myAction_myUpDownSelectTag" />&nbsp;
 </td></tr>
 </table>
 </td>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt
index ef160a5c2..e69306856 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-1.txt
@@ -4,11 +4,11 @@
   <script src="/static/inputtransferselect.js" nonce="r4nd0m"></script>
   <table>
   <tr><td><input type="text" name="collection_input" 
id="collection_input"/></td>
-      <td 
class="tdTransferSelect"><inputtype="button"value="-&gt;"onclick="addOption(document.getElementById('collection_input'),document.getElementById('collection'))"/>
+      <td 
class="tdTransferSelect"><inputtype="button"value="-&gt;"data-struts-inputtransferselect="add"
 data-struts-target="collection"/>
       <br/><br/>
-      <input 
type="button"value="&lt;-"onclick="removeOptions(document.getElementById('collection'))"/>
+      <input 
type="button"value="&lt;-"data-struts-inputtransferselect="remove" 
data-struts-target="collection"/>
       <br/><br/>
-      
<inputtype="button"value="&lt;&lt;--"onclick="removeAllOptions(document.getElementById('collection'))"/>
+      
<inputtype="button"value="&lt;&lt;--"data-struts-inputtransferselect="removeAll"
 data-struts-target="collection"/>
       <br/>
       <br/>
   </td>
@@ -17,8 +17,8 @@
       <optionvalue="ItemOne"selected="selected">ItemOne</option>
       <optionvalue="ItemTwo"selected="selected">ItemTwo</option></select>
       
<inputtype="hidden"id="__multiselect_collection"name="__multiselect_collection"value=""/>
-      
<inputtype="button"onclick="moveOptionDown(document.getElementById('collection'),'key','');"value="v"/>
-      
<inputtype="button"onclick="moveOptionUp(document.getElementById('collection'),'key','');"value="^"/>
+      <inputtype="button"data-struts-inputtransferselect="moveDown" 
data-struts-target="collection"value="v"/>
+      <inputtype="button"data-struts-inputtransferselect="moveUp" 
data-struts-target="collection"value="^"/>
   </td></tr>
   </table>
 </td></tr>
\ No newline at end of file
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-2.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-2.txt
index 6260cc68c..af5acfdb2 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-2.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/inputtransferselect-2.txt
@@ -7,11 +7,11 @@
         <td><input type="text" name="collection_input" id="collection_input" 
collection-name="inputName" /></td>
         <td class="tdTransferSelect">
           <input type="button" value="-&gt;"
-            
onclick="addOption(document.getElementById('collection_input'),document.getElementById('collection'))"
 />
+            data-struts-inputtransferselect="add" 
data-struts-target="collection" />
           <br /><br />
-          <input type="button" value="&lt;-" 
onclick="removeOptions(document.getElementById('collection'))" />
+          <input type="button" value="&lt;-" 
data-struts-inputtransferselect="remove" data-struts-target="collection" />
           <br /><br />
-          <input type="button" value="&lt;&lt;--" 
onclick="removeAllOptions(document.getElementById('collection'))" />
+          <input type="button" value="&lt;&lt;--" 
data-struts-inputtransferselect="removeAll" data-struts-target="collection" />
           <br />
           <br />
         </td>
@@ -21,8 +21,8 @@
             <option value="ItemTwo" selected="selected">ItemTwo</option>
           </select>
           <input type="hidden" id="__multiselect_collection" 
name="__multiselect_collection" value="" />
-          <input type="button" 
onclick="moveOptionDown(document.getElementById('collection'),'key','');" 
value="v" />
-          <input type="button" 
onclick="moveOptionUp(document.getElementById('collection'),'key','');" 
value="^" />
+          <input type="button" data-struts-inputtransferselect="moveDown" 
data-struts-target="collection" value="v" />
+          <input type="button" data-struts-inputtransferselect="moveUp" 
data-struts-target="collection" value="^" />
         </td>
       </tr>
     </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt
index c94d40565..f9e7edff1 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-1.txt
@@ -13,20 +13,20 @@
        <option value="Left2" selected="selected">Left2</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Left" 
onclick="moveAllOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="All Left" 
data-struts-optiontransferselect="addAllToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Right" 
onclick="moveAllOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="All Right" 
data-struts-optiontransferselect="addAllToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Select All" 
onclick="selectAllOptionsExceptSome(document.getElementById('id'), 'key', 
'Header Key');selectAllOptionsExceptSome(document.getElementById('doubleId'), 
'key', 'Double Header Key');" /><br/><br/>
+                       value="Select All" 
data-struts-optiontransferselect="selectAll" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
 </td>
 <td>
        <label for="rightTitle">Title Right</label><br/>
@@ -44,8 +44,8 @@
        <option value="Right2" selected="selected">Right2</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 </tr>
 </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt
index 1939871cb..5de903cad 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-2.txt
@@ -14,20 +14,20 @@
        <option value="Left3">Left3</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Left" 
onclick="moveAllOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="All Left" 
data-struts-optiontransferselect="addAllToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Right" 
onclick="moveAllOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="All Right" 
data-struts-optiontransferselect="addAllToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Select All" 
onclick="selectAllOptionsExceptSome(document.getElementById('id'), 'key', 
'Header Key');selectAllOptionsExceptSome(document.getElementById('doubleId'), 
'key', 'Double Header Key');" /><br/><br/>
+                       value="Select All" 
data-struts-optiontransferselect="selectAll" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
 </td> <td>
        <label for="rightTitle">Title Right</label><br/>
        <select
@@ -43,8 +43,8 @@
        <option value="Right3">Right3</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 </tr>
 </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt
index 1b0d645d5..617cbd685 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-3.txt
@@ -13,20 +13,20 @@
        <option value="Left3">Left3</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', '');" value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', '');" value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, '');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, '');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Left" 
onclick="moveAllOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, '');" /><br/><br/>
+                       value="All Left" 
data-struts-optiontransferselect="addAllToLeft" data-struts-left="id" 
data-struts-right="doubleId" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Right" 
onclick="moveAllOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, '');" /><br/><br/>
+                       value="All Right" 
data-struts-optiontransferselect="addAllToRight" data-struts-left="id" 
data-struts-right="doubleId" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Select All" 
onclick="selectAllOptions(document.getElementById('id'));selectAllOptions(document.getElementById('doubleId'));"
 /><br/><br/>
+                       value="Select All" 
data-struts-optiontransferselect="selectAll" data-struts-left="id" 
data-struts-right="doubleId" /><br/><br/>
 </td>
 <td>
        <label for="rightTitle">Title Right</label><br/>
@@ -42,8 +42,8 @@
        <option value="Right3">Right3</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', '');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', '');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" value="^" />
 </td>
 </tr>
 </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt
index 6f0952327..7150a9c0c 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-4.txt
@@ -14,20 +14,20 @@
        <option value="Left3">Left3</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, '');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Left" 
onclick="moveAllOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, '');" /><br/><br/>
+                       value="All Left" 
data-struts-optiontransferselect="addAllToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Right" 
onclick="moveAllOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="All Right" 
data-struts-optiontransferselect="addAllToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Select All" 
onclick="selectAllOptionsExceptSome(document.getElementById('id'), 'key', 
'Header Key');selectAllOptions(document.getElementById('doubleId'));" 
/><br/><br/>
+                       value="Select All" 
data-struts-optiontransferselect="selectAll" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" /><br/><br/>
 </td>
 <td>
        <label for="rightTitle">Title Right</label><br/>
@@ -43,8 +43,8 @@
        <option value="Right3">Right3</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', '');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', '');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" value="^" />
 
 </td>
 </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt
index 2cdccaefe..dd7ccb14f 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-5.txt
@@ -13,20 +13,20 @@
        <option value="Left3">Left3</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Left" 
onclick="moveAllOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="All Left" 
data-struts-optiontransferselect="addAllToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Right" 
onclick="moveAllOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="All Right" 
data-struts-optiontransferselect="addAllToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Select All" 
onclick="selectAllOptionsExceptSome(document.getElementById('id'), 'key', 
'Header Key');selectAllOptionsExceptSome(document.getElementById('doubleId'), 
'key', 'Double Header Key');" /><br/><br/>
+                       value="Select All" 
data-struts-optiontransferselect="selectAll" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
 </td>
 <td>
        <label for="rightTitle">Title Right</label><br/>
@@ -42,8 +42,8 @@
        <option value="Right3">Right3</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 </tr>
 </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt
index 56fdba726..6e13c164e 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-6.txt
@@ -14,20 +14,20 @@
        <option value="Left3">Left3</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Left" 
onclick="moveAllOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');" /><br/><br/>
+                       value="All Left" 
data-struts-optiontransferselect="addAllToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="All Right" 
onclick="moveAllOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');" /><br/><br/>
+                       value="All Right" 
data-struts-optiontransferselect="addAllToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Select All" 
onclick="selectAllOptionsExceptSome(document.getElementById('id'), 'key', 
'Header Key');selectAllOptionsExceptSome(document.getElementById('doubleId'), 
'key', 'Double Header Key');" /><br/><br/>
+                       value="Select All" 
data-struts-optiontransferselect="selectAll" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" /><br/><br/>
 </td>
 <td>
        <label for="rightTitle">Title Right</label><br/>
@@ -43,8 +43,8 @@
        <option value="Right3">Right3</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 </tr>
 </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt
index e5a039230..07f3d26b0 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-7.txt
@@ -14,14 +14,14 @@
        <option value="Left3">Left3</option>
        </select>
        <input type="hidden" id="__multiselect_id" 
name="__multiselect_collection" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('id'), 'key', 'Header Key');" 
value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('id'), 'key', 'Header Key');" 
value="^" />
+       <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 <td class="tdTransferSelect">
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Left" 
onclick="moveSelectedOptions(document.getElementById('doubleId'), 
document.getElementById('id'), false, 'Double Header Key', '');alert('Moving 
Left');" /><br/><br/>
+                       value="Left" 
data-struts-optiontransferselect="addToLeft" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" onclick="alert('Moving 
Left');" /><br/><br/>
        <input type="button" class="buttonCssClass" style="buttonCssStyle"
-                       value="Right" 
onclick="moveSelectedOptions(document.getElementById('id'), 
document.getElementById('doubleId'), false, 'Header Key', '');alert('Moving 
Right');" /><br/><br/>
+                       value="Right" 
data-struts-optiontransferselect="addToRight" data-struts-left="id" 
data-struts-right="doubleId" data-struts-header-key="Header Key" 
data-struts-double-header-key="Double Header Key" onclick="alert('Moving 
Right');" /><br/><br/>
 </td>
 <td>
        <label for="rightTitle">Title Right</label><br/>
@@ -38,8 +38,8 @@
        <option value="Right3">Right3</option>
        </select>
        <input type="hidden" id="__multiselect_doubleId" 
name="__multiselect_list2" value=""/>
-       <input type="button" 
onclick="moveOptionDown(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="v" />
-       <input type="button" 
onclick="moveOptionUp(document.getElementById('doubleId'), 'key', 'Double 
Header Key');" value="^" />
+       <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="v" />
+       <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="id" data-struts-right="doubleId" 
data-struts-header-key="Header Key" data-struts-double-header-key="Double 
Header Key" value="^" />
 </td>
 </tr>
 </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-8.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-8.txt
index 69358f932..d8225ee1a 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-8.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/optiontransferselect-8.txt
@@ -10,28 +10,28 @@
             <option value="Left2" selected="selected">Left2</option>
           </select>
           <input type="hidden" id="__multiselect_collection" 
name="__multiselect_collection" value="" />
-          <input type="button" 
onclick="moveOptionDown(document.getElementById('collection'),'key',''); " 
value="v" />
-          <input type="button" 
onclick="moveOptionUp(document.getElementById('collection'),'key',''); " 
value="^" />
+          <input type="button" data-struts-optiontransferselect="leftDown" 
data-struts-left="collection" data-struts-right="list2" value="v" />
+          <input type="button" data-struts-optiontransferselect="leftUp" 
data-struts-left="collection" data-struts-right="list2" value="^" />
         </td>
         <td class="tdTransferSelect">
           <input type="button" value="&lt;-"
-            
onclick="moveSelectedOptions(document.getElementById('list2'),document.getElementById('collection'),false,'');"
 />
+            data-struts-optiontransferselect="addToLeft" 
data-struts-left="collection" data-struts-right="list2" />
           <br />
           <br />
           <input type="button" value="-&gt;"
-            
onclick="moveSelectedOptions(document.getElementById('collection'),document.getElementById('list2'),false,'');"
 />
+            data-struts-optiontransferselect="addToRight" 
data-struts-left="collection" data-struts-right="list2" />
           <br />
           <br />
           <input type="button" value="&lt;&lt;--"
-            
onclick="moveAllOptions(document.getElementById('list2'),document.getElementById('collection'),false,'');"
 />
+            data-struts-optiontransferselect="addAllToLeft" 
data-struts-left="collection" data-struts-right="list2" />
           <br />
           <br />
           <input type="button" value="--&gt;&gt;"
-            
onclick="moveAllOptions(document.getElementById('collection'),document.getElementById('list2'),false,'');"
 />
+            data-struts-optiontransferselect="addAllToRight" 
data-struts-left="collection" data-struts-right="list2" />
           <br />
           <br />
           <input type="button" value="&lt;*&gt;"
-            
onclick="selectAllOptions(document.getElementById('collection'));selectAllOptions(document.getElementById('list2'));"
 />
+            data-struts-optiontransferselect="selectAll" 
data-struts-left="collection" data-struts-right="list2" />
           <br />
           <br />
         </td>
@@ -41,8 +41,8 @@
             <option value="Right2" selected="selected">Right2</option>
           </select>
           <input type="hidden" id="__multiselect_list2" 
name="__multiselect_list2" value="" />
-          <input type="button" 
onclick="moveOptionDown(document.getElementById('list2'),'key','');" value="v" 
/>
-          <input type="button" 
onclick="moveOptionUp(document.getElementById('list2'),'key','');" value="^" />
+          <input type="button" data-struts-optiontransferselect="rightDown" 
data-struts-left="collection" data-struts-right="list2" value="v" />
+          <input type="button" data-struts-optiontransferselect="rightUp" 
data-struts-left="collection" data-struts-right="list2" value="^" />
         </td>
       </tr>
     </table>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt
index eb86508da..f757cae41 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-1.txt
@@ -12,9 +12,9 @@
 <input type="hidden" id="__multiselect_myId" 
name="__multiselect_myName"value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt
index 76489dda3..8a26cab2c 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-10.txt
@@ -12,9 +12,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-        &nbsp;<input type="button" value="Move Up" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-        &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-        &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+        &nbsp;<input type="button" value="Move Up" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+        &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+        &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt
 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt
index 943766ef6..ba6377749 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-11.txt
@@ -12,9 +12,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="Move Down" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="Move Down" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt
index fd2d70840..816e0c1e1 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-2.txt
@@ -11,9 +11,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt
index 3a1cf7e65..9766b0a35 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-3.txt
@@ -13,9 +13,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '-1');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '-1');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptionsExceptSome(document.getElementById('myId'), 'key', 
'-1');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" 
data-struts-header-key="-1" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" 
data-struts-header-key="-1" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" 
data-struts-header-key="-1" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt
index c27eeb97d..bb0f75149 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-4.txt
@@ -12,9 +12,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '-1');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '-1');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptionsExceptSome(document.getElementById('myId'), 'key', 
'-1');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" 
data-struts-header-key="-1" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" 
data-struts-header-key="-1" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" 
data-struts-header-key="-1" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt
index 168ed9c07..69436b822 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-5.txt
@@ -12,9 +12,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt
index 47644f52d..4981f617b 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-6.txt
@@ -12,8 +12,8 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt
index 551e39741..d47a496d6 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-7.txt
@@ -12,8 +12,8 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt
index d089a88be..55de5f3f6 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-8.txt
@@ -12,8 +12,8 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="*" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="*" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt
index 26d4629bc..3b99f0ad7 100644
--- 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt
+++ 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/updownselecttag-9.txt
@@ -12,9 +12,9 @@
 <input type="hidden" id="__multiselect_myId" name="__multiselect_myName" 
value=""/>
 </td></tr>
 <tr><td>
-               &nbsp;<input type="button" value="^" 
onclick="moveOptionUp(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="v" 
onclick="moveOptionDown(document.getElementById('myId'), 'key', '');" />&nbsp;
-               &nbsp;<input type="button" value="Select All" 
onclick="selectAllOptions(document.getElementById('myId'), 'key', '');" />&nbsp;
+               &nbsp;<input type="button" value="^" 
data-struts-updownselect="moveUp" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="v" 
data-struts-updownselect="moveDown" data-struts-target="myId" />&nbsp;
+               &nbsp;<input type="button" value="Select All" 
data-struts-updownselect="selectAll" data-struts-target="myId" />&nbsp;
 </td></tr>
 </table>
 </td> </tr>

Reply via email to