WW-4452 Solves problem with using -1 as headerKey
Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/312a2717 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/312a2717 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/312a2717 Branch: refs/heads/master Commit: 312a2717cf2f7094e42a83f7f05cb493c3d393c8 Parents: 46b28e0 Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Mon Feb 2 21:22:42 2015 +0100 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Mon Feb 2 21:22:42 2015 +0100 ---------------------------------------------------------------------- .../resources/org/apache/struts2/static/inputtransferselect.js | 2 +- .../resources/org/apache/struts2/static/optiontransferselect.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/312a2717/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js ---------------------------------------------------------------------- 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 c983d69..bda929e 100644 --- a/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js +++ b/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js @@ -63,7 +63,7 @@ function compile(ptn) { if (ptn == '' || !window.RegExp) { return function(val) { return val == ptn; } } else { - var reg = new RegExp(ptn); + var reg = new RegExp("^" + ptn + "$"); return function (val) { if (val == '') { // ignore empty option added by template return true; http://git-wip-us.apache.org/repos/asf/struts/blob/312a2717/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js ---------------------------------------------------------------------- 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 85a2e28..105addf 100644 --- a/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js +++ b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js @@ -44,7 +44,7 @@ function compile(ptn) { if (ptn == '' || !window.RegExp) { return function(val) { return val == ptn; } } else { - var reg = new RegExp("\\b" + ptn); + var reg = new RegExp("^" + ptn + "$"); return function (val) { if (val == '') { // ignore empty option added by template return true;