Author: chris.laprun(a)jboss.com
Date: 2012-02-28 09:49:58 -0500 (Tue, 28 Feb 2012)
New Revision: 8476
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java
Log:
- GTNPORTAL-2361: Fixed improper error message.
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java 2012-02-28
12:56:11 UTC (rev 8475)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/AbstractValidator.java 2012-02-28
14:49:58 UTC (rev 8476)
@@ -74,8 +74,13 @@
protected MessageException createMessageException(String value, UIFormInput uiInput)
throws Exception
{
- return new MessageException(new ApplicationMessage(getMessageLocalizationKey(),
getMessageArgs(value, uiInput), ApplicationMessage.WARNING));
+ return createMessageException(value, uiInput, getMessageLocalizationKey());
}
+
+ protected MessageException createMessageException(String value, UIFormInput uiInput,
String localizationKey) throws Exception
+ {
+ return new MessageException(new ApplicationMessage(localizationKey,
getMessageArgs(value, uiInput), ApplicationMessage.WARNING));
+ }
protected Object[] getMessageArgs(String value, UIFormInput uiInput) throws Exception
{
@@ -101,7 +106,7 @@
if(exceptionOnMissingMandatory && value == null)
{
- throw createMessageException("EmptyFieldValidator.msg.empty-input",
uiInput);
+ throw createMessageException(value, uiInput,
"EmptyFieldValidator.msg.empty-input");
}
return value;
Show replies by date