Author: julien_viet
Date: 2010-07-22 18:43:39 -0400 (Thu, 22 Jul 2010)
New Revision: 3688
Added:
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
Removed:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
Log:
move UIApplicationLifecycle to the webui portlet module as it is actually only targetted
to portlets and changed its generic parameterization to UIPortletApplication instead of
UIComponent
Deleted:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22
17:01:42 UTC (rev 3687)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22
22:43:39 UTC (rev 3688)
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.webui.core.lifecycle;
-
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.core.UIComponent;
-import org.exoplatform.webui.core.UIPortletApplication;
-
-/**
- * Author : Nhu Dinh Thuan
- * nhudinhthuan(a)yahoo.com
- * Jun 1, 2006
- */
-public class UIApplicationLifecycle extends Lifecycle<UIComponent>
-{
-
- public void processDecode(UIComponent uicomponent, WebuiRequestContext context) throws
Exception
- {
- String componentId =
context.getRequestParameter(context.getUIComponentIdParameterName());
- if (componentId == null || componentId.length() == 0)
- return;
- UIComponent uiTarget = uicomponent.findComponentById(componentId);
- //TODO to avoid exception
- if (uiTarget == null)
- return;
- else if (uiTarget == uicomponent)
- super.processDecode(uicomponent, context);
- else
- uiTarget.processDecode(context);
- }
-
- public void processAction(UIComponent uicomponent, WebuiRequestContext context) throws
Exception
- {
- String componentId =
context.getRequestParameter(context.getUIComponentIdParameterName());
- if (componentId != null)
- {
- UIComponent uiTarget = uicomponent.findComponentById(componentId);
- if (uiTarget == uicomponent)
- super.processAction(uicomponent, context);
- else if (uiTarget != null)
- uiTarget.processAction(context);
- }
- }
-
- public void processRender(UIComponent uicomponent, WebuiRequestContext context) throws
Exception
- {
- if (uicomponent.getTemplate() != null)
- {
- super.processRender(uicomponent, context);
- return;
- }
- UIPortletApplication uiApp = (UIPortletApplication)uicomponent;
-
- context.getWriter().append("<div
id=\"").append(uicomponent.getId()).append("\"").append("class=\"").append(uicomponent.getId()).append("\">");
-
- uiApp.renderChildren();
- context.getWriter().append("</div>");
- }
-}
\ No newline at end of file
Copied:
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
(from rev 3684,
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java)
===================================================================
---
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
(rev 0)
+++
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22
22:43:39 UTC (rev 3688)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.webui.core.lifecycle;
+
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIPortletApplication;
+
+/**
+ * Author : Nhu Dinh Thuan
+ * nhudinhthuan(a)yahoo.com
+ * Jun 1, 2006
+ */
+public class UIApplicationLifecycle extends Lifecycle<UIPortletApplication>
+{
+
+ public void processDecode(UIPortletApplication uicomponent, WebuiRequestContext
context) throws Exception
+ {
+ String componentId =
context.getRequestParameter(context.getUIComponentIdParameterName());
+ if (componentId == null || componentId.length() == 0)
+ return;
+ UIComponent uiTarget = uicomponent.findComponentById(componentId);
+ //TODO to avoid exception
+ if (uiTarget == null)
+ return;
+ else if (uiTarget == uicomponent)
+ super.processDecode(uicomponent, context);
+ else
+ uiTarget.processDecode(context);
+ }
+
+ public void processAction(UIPortletApplication uicomponent, WebuiRequestContext
context) throws Exception
+ {
+ String componentId =
context.getRequestParameter(context.getUIComponentIdParameterName());
+ if (componentId != null)
+ {
+ UIComponent uiTarget = uicomponent.findComponentById(componentId);
+ if (uiTarget == uicomponent)
+ super.processAction(uicomponent, context);
+ else if (uiTarget != null)
+ uiTarget.processAction(context);
+ }
+ }
+
+ public void processRender(UIPortletApplication uicomponent, WebuiRequestContext
context) throws Exception
+ {
+ if (uicomponent.getTemplate() != null)
+ {
+ super.processRender(uicomponent, context);
+ return;
+ }
+ UIPortletApplication uiApp = uicomponent;
+
+ context.getWriter().append("<div
id=\"").append(uicomponent.getId()).append("\"").append("class=\"").append(uicomponent.getId()).append("\">");
+
+ uiApp.renderChildren();
+ context.getWriter().append("</div>");
+ }
+}
\ No newline at end of file