[jaxx] branch develop updated (3ec69a3 -> 5758e2d)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git from 3ec69a3 fixes #3512: Use nuitonpom 1.3 new 5758e2d fixes #3513: Use a *validatorLabel* client property to translate field in unified validator table The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 5758e2dff1a357c0486c6bc3e90a47870447ba05 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 15 10:47:27 2014 +0200 fixes #3513: Use a *validatorLabel* client property to translate field in unified validator table Summary of changes: .../validator/swing/SwingValidatorUtil.java | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See http://git.nuiton.org/jaxx.git commit 5758e2dff1a357c0486c6bc3e90a47870447ba05 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 15 10:47:27 2014 +0200 fixes #3513: Use a *validatorLabel* client property to translate field in unified validator table --- .../validator/swing/SwingValidatorUtil.java | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingValidatorUtil.java b/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingValidatorUtil.java index 1542eeb..aa38353 100644 --- a/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingValidatorUtil.java +++ b/jaxx-validator/src/main/java/jaxx/runtime/validator/swing/SwingValidatorUtil.java @@ -562,17 +562,33 @@ public class SwingValidatorUtil extends SimpleBeanValidators { public static String getFieldName(UnifiedValidatorMessage model, String value) { String text = null; JComponent editor = model.getEditor(); + Object validatorLabel = null; if (editor != null) { - text = (String) editor.getClientProperty("validatorLabel"); - /*if (l != null) { - text = I18n.t(l); + + validatorLabel = editor.getClientProperty("validatorLabel"); + + } + + if (validatorLabel != null) { + + if (model.isSimpleValidator()) { + + text = (String) validatorLabel; + } else { - // TODO should try the text - }*/ + + Map<String, String> validatorLabelMap = (Map<String, String>) validatorLabel; + + String field = model.getField(); + text = validatorLabelMap.get(field); + + } } + if (text == null) { text = value; } + return text; } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm