Author: ghjboss
Date: 2012-11-08 23:56:31 -0500 (Thu, 08 Nov 2012)
New Revision: 8953
Modified:
epp/portal/branches/EPP_5_2_2_GA_BZ874821/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
epp/portal/branches/EPP_5_2_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
epp/portal/branches/EPP_5_2_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java
Log:
commit the fix for BZ874821
Modified:
epp/portal/branches/EPP_5_2_2_GA_BZ874821/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java
===================================================================
---
epp/portal/branches/EPP_5_2_2_GA_BZ874821/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-11-08
21:39:42 UTC (rev 8952)
+++
epp/portal/branches/EPP_5_2_2_GA_BZ874821/component/web/controller/src/main/java/org/exoplatform/web/application/ApplicationMessage.java 2012-11-09
04:56:31 UTC (rev 8953)
@@ -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_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2012-11-08
21:39:42 UTC (rev 8952)
+++
epp/portal/branches/EPP_5_2_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2012-11-09
04:56:31 UTC (rev 8953)
@@ -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_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java 2012-11-08
21:39:42 UTC (rev 8952)
+++
epp/portal/branches/EPP_5_2_2_GA_BZ874821/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageNodeForm.java 2012-11-09
04:56:31 UTC (rev 8953)
@@ -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_2_GA_BZ874821/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java
===================================================================
---
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java 2012-11-08
21:39:42 UTC (rev 8952)
+++
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIFormLifecycle.java 2012-11-09
04:56:31 UTC (rev 8953)
@@ -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_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java
===================================================================
---
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java 2012-11-08
21:39:42 UTC (rev 8952)
+++
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java 2012-11-09
04:56:31 UTC (rev 8953)
@@ -138,7 +138,7 @@
}
catch (MessageException ex)
{
- addMessage(ex.getDetailMessage());
+ addMessage(ex.getDetailedMessage());
}
catch (Throwable t)
{
Modified:
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java
===================================================================
---
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java 2012-11-08
21:39:42 UTC (rev 8952)
+++
epp/portal/branches/EPP_5_2_2_GA_BZ874821/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java 2012-11-09
04:56:31 UTC (rev 8953)
@@ -45,9 +45,13 @@
this((AbstractApplicationMessage)message);
}
- public AbstractApplicationMessage getDetailMessage()
+ public AbstractApplicationMessage getDetailedMessage()
{
return message;
}
+ public ApplicationMessage getDetailMessage()
+ {
+ return new ApplicationMessage(message.getMessage());
+ }
}