Author: julien_viet
Date: 2010-07-12 04:17:47 -0400 (Mon, 12 Jul 2010)
New Revision: 3600
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
Log:
a bit more type safe
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java 2010-07-12
07:53:27 UTC (rev 3599)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java 2010-07-12
08:17:47 UTC (rev 3600)
@@ -22,6 +22,7 @@
import org.exoplatform.webui.Util;
import org.exoplatform.commons.serialization.api.annotations.Converted;
import org.exoplatform.webui.config.metadata.ComponentMetaData;
+import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.lifecycle.Lifecycle;
import org.exoplatform.webui.event.EventListener;
@@ -57,7 +58,7 @@
private Map<String, Event> eventMap;
- private Lifecycle componentLifecycle;
+ private Lifecycle<UIComponent> componentLifecycle;
public Component(ComponentMetaData metaData)
{
@@ -233,7 +234,7 @@
event.setCachedEventListeners(cachedListeners);
}
- public Lifecycle getUIComponentLifecycle() throws Exception
+ public Lifecycle<UIComponent> getUIComponentLifecycle() throws Exception
{
if (componentLifecycle != null)
{
@@ -241,11 +242,11 @@
}
if (lifecycle != null)
{
- componentLifecycle = (Lifecycle)Util.createObject(lifecycle, null);
+ componentLifecycle = (Lifecycle<UIComponent>)Util.createObject(lifecycle,
null);
}
else
{
- componentLifecycle = Util.createObject(Lifecycle.class, null);
+ componentLifecycle =
(Lifecycle<UIComponent>)Util.createObject(Lifecycle.class, null);
}
return componentLifecycle;
}
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-12
07:53:27 UTC (rev 3599)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-07-12
08:17:47 UTC (rev 3600)
@@ -61,8 +61,9 @@
protected Component config;
private transient ValueRendererRegistry rendererRegistry = new
ValueRendererRegistry();
- private static final Lifecycle DEFAULT_LIFECYCLE = new Lifecycle();
+ private static final Lifecycle<UIComponent> DEFAULT_LIFECYCLE = new
Lifecycle<UIComponent>();
+
public String getId()
{
return this.id;
@@ -153,7 +154,7 @@
}
}
- private Lifecycle getLifecycle() throws Exception
+ private Lifecycle<UIComponent> getLifecycle() throws Exception
{
if (config == null)
{
Show replies by date