Author: ndkhoiits
Date: 2010-09-23 03:54:09 -0400 (Thu, 23 Sep 2010)
New Revision: 4319
Modified:
portal/branches/branch-GTNPORTAL-1493/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java
Log:
GTNPORTAL-1482 Catch MissiongResourceException when get resource in UIForm
Modified:
portal/branches/branch-GTNPORTAL-1493/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1493/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java 2010-09-23
06:27:35 UTC (rev 4318)
+++
portal/branches/branch-GTNPORTAL-1493/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java 2010-09-23
07:54:09 UTC (rev 4319)
@@ -22,6 +22,7 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.webui.bean.BeanDataMapping;
import org.exoplatform.webui.bean.ReflectionDataMapping;
import org.exoplatform.webui.config.Event;
@@ -289,7 +290,14 @@
String confirm = event.getConfirm();
if (confirm != null && confirm.trim().length() > 0)
{
- confirm = rcontext.getApplicationResourceBundle().getString(confirm);
+ try
+ {
+ confirm = rcontext.getApplicationResourceBundle().getString(confirm);
+ }
+ catch (MissingResourceException exp)
+ {
+ confirm = confirm.substring(confirm.lastIndexOf('.') + 1);
+ }
b.append("if(confirm('").append(confirm.replaceAll("'",
"\\\\'")).append("'))");
}
b.append("eXo.webui.UIForm.submitEvent('").append(getFormId()).append("','");
Show replies by date