Author: ghjboss
Date: 2012-08-29 15:30:28 -0400 (Wed, 29 Aug 2012)
New Revision: 8826
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java
Log:
commit the fix for BZ852550
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
===================================================================
---
epp/portal/branches/EPP_5_2_1_GA_BZ852550/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-08-29
15:06:22 UTC (rev 8825)
+++
epp/portal/branches/EPP_5_2_1_GA_BZ852550/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-08-29
19:30:28 UTC (rev 8826)
@@ -30,13 +30,22 @@
{
private final String messageKey_;
private final Object[] messageArgs_;
+ private String message;
public ApplicationMessage(String key, Object[] args)
{
this.messageKey_ = key;
this.messageArgs_ = args;
+ message = null;
}
+ public ApplicationMessage(String message)
+ {
+ messageKey_ = null;
+ messageArgs_ = null;
+ this.message = message;
+ }
+
@Override
public boolean equals(Object o)
{
@@ -85,24 +94,32 @@
public String getMessage()
{
- String msg = resolveMessage(messageKey_);
- if (msg != null && messageArgs_ != null)
+ if (message == null)
{
- for (int i = 0; i < messageArgs_.length; i++)
+ String msg = resolveMessage(messageKey_);
+ if (msg != null && messageArgs_ != null)
{
- final Object messageArg = messageArgs_[i];
- if (messageArg != null)
+ for (int i = 0; i < messageArgs_.length; i++)
{
- String arg = messageArg.toString();
- if (isArgsLocalized())
+ final Object messageArg = messageArgs_[i];
+ if (messageArg != null)
{
- arg = resolveMessage(arg);
+ String arg = messageArg.toString();
+ if (isArgsLocalized())
+ {
+ arg = resolveMessage(arg);
+ }
+ msg = msg.replace("{" + i + "}", arg);
}
- msg = msg.replace("{" + i + "}", arg);
}
}
+
+ message = msg;
+ return msg;
}
-
- return msg;
+ else
+ {
+ return message;
+ }
}
}
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2012-08-29
15:06:22 UTC (rev 8825)
+++
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2012-08-29
19:30:28 UTC (rev 8826)
@@ -154,7 +154,7 @@
}
catch (MessageException e)
{
-
event.getRequestContext().getUIApplication().addMessage(e.getDetailMessage());
+
event.getRequestContext().getUIApplication().addMessage(e.getDetailedMessage());
return;
}
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java 2012-08-29
15:06:22 UTC (rev 8825)
+++
epp/portal/branches/EPP_5_2_1_GA_BZ852550/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java 2012-08-29
19:30:28 UTC (rev 8826)
@@ -677,7 +677,7 @@
}
catch (MessageException ex)
{
- uiPortalApp.addMessage(ex.getDetailMessage());
+ uiPortalApp.addMessage(ex.getDetailedMessage());
return;
}
catch (Exception ex)
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java
===================================================================
---
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java 2012-08-29
15:06:22 UTC (rev 8825)
+++
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java 2012-08-29
19:30:28 UTC (rev 8826)
@@ -195,7 +195,7 @@
}
catch (MessageException ex)
{
- uiApp.addMessage(ex.getDetailMessage());
+ uiApp.addMessage(ex.getDetailedMessage());
context.setProcessRender(true);
}
catch (Exception ex)
@@ -231,7 +231,7 @@
}
catch (MessageException ex)
{
- uiApp.addMessage(ex.getDetailMessage());
+ uiApp.addMessage(ex.getDetailedMessage());
context.setProcessRender(true);
}
}
@@ -261,7 +261,7 @@
}
catch (MessageException ex)
{
- uiApp.addMessage(ex.getDetailMessage());
+ uiApp.addMessage(ex.getDetailedMessage());
context.setProcessRender(true);
}
catch (Exception ex)
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java
===================================================================
---
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java 2012-08-29
15:06:22 UTC (rev 8825)
+++
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java 2012-08-29
19:30:28 UTC (rev 8826)
@@ -138,7 +138,7 @@
}
catch (MessageException ex)
{
- addMessage(ex.getDetailMessage());
+ addMessage(ex.getDetailedMessage());
}
catch (Throwable t)
{
Modified:
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java
===================================================================
---
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java 2012-08-29
15:06:22 UTC (rev 8825)
+++
epp/portal/branches/EPP_5_2_1_GA_BZ852550/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java 2012-08-29
19:30:28 UTC (rev 8826)
@@ -45,9 +45,13 @@
this((AbstractApplicationMessage)message);
}
- public AbstractApplicationMessage getDetailMessage()
+ public AbstractApplicationMessage getDetailedMessage()
{
return message;
}
+ public ApplicationMessage getDetailMessage()
+ {
+ return new ApplicationMessage(message.getMessage());
+ }
}