Author: julien_viet
Date: 2010-07-19 11:16:11 -0400 (Mon, 19 Jul 2010)
New Revision: 3654
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
Log:
replace printStackTrace by proper logging + javadoc
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-07-19
15:01:31 UTC (rev 3653)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-07-19
15:16:11 UTC (rev 3654)
@@ -282,7 +282,15 @@
return url(name, beanId, null);
}
- @SuppressWarnings("unchecked")
+ /**
+ * Render an event URL of a given bean.
+ *
+ * @param name the event name
+ * @param beanId the optional bean id
+ * @param params the optional event parameters
+ * @return the rendered URL
+ * @throws Exception any exception
+ */
public String url(String name, String beanId, Parameter[] params) throws Exception
{
org.exoplatform.webui.config.Event event = config.getUIComponentEventConfig(name);
@@ -294,11 +302,11 @@
String confirm = loadConfirmMesssage(event, context, beanId);
try
{
- return context.getURLBuilder().createURL(this, event.getName(), confirm, beanId,
params).toString();
+ return context.getURLBuilder().createURL(this, event.getName(), confirm, beanId,
params);
}
catch (Exception e)
{
- e.printStackTrace();
+ log.error("Could not render component even URL for id=" + beanId +
", name=" + name, e);
return "";
}
}
Show replies by date