[gatein-commits] gatein SVN: r3682 - in portal/trunk/webui: core and 12 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jul 22 08:05:40 EDT 2010


Author: julien_viet
Date: 2010-07-22 08:05:39 -0400 (Thu, 22 Jul 2010)
New Revision: 3682

Added:
   portal/trunk/webui/portlet/
   portal/trunk/webui/portlet/pom.xml
   portal/trunk/webui/portlet/src/
   portal/trunk/webui/portlet/src/main/
   portal/trunk/webui/portlet/src/main/java/
   portal/trunk/webui/portlet/src/main/java/org/
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
Removed:
   portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/
   portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
   portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
Modified:
   portal/trunk/webui/core/pom.xml
   portal/trunk/webui/pom.xml
Log:
GTNPORTAL-1369 : Decouple webui base framework from the core webui module


Modified: portal/trunk/webui/core/pom.xml
===================================================================
--- portal/trunk/webui/core/pom.xml	2010-07-22 10:59:56 UTC (rev 3681)
+++ portal/trunk/webui/core/pom.xml	2010-07-22 12:05:39 UTC (rev 3682)
@@ -38,6 +38,10 @@
     </dependency>
     <dependency>
       <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.webui.portlet</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
       <artifactId>exo.portal.component.portal</artifactId>
     </dependency>
     <dependency>

Deleted: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java	2010-07-22 10:59:56 UTC (rev 3681)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java	2010-07-22 12:05:39 UTC (rev 3682)
@@ -1,109 +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;
-
-import org.exoplatform.webui.application.WebuiApplication;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
-
-import java.io.Writer;
-import java.util.Set;
-
- at Serialized
-abstract public class UIPortletApplication extends UIApplication
-{
-   private int minWidth = 300;
-
-   private int minHeight = 300;
-
-   static public String VIEW_MODE = "ViewMode";
-
-   static public String EDIT_MODE = "EditMode";
-
-   static public String HELP_MODE = "HelpMode";
-
-   static public String CONFIG_MODE = "ConfigMode";
-
-   public UIPortletApplication() throws Exception
-   {
-   }
-
-   @Deprecated
-   public int getMinWidth()
-   {
-      return minWidth;
-   }
-   
-   @Deprecated
-   public void setMinWidth(int minWidth)
-   {
-      this.minWidth = minWidth;
-   }
-   
-   @Deprecated
-   public int getMinHeight()
-   {
-      return minHeight;
-   }
-   
-   @Deprecated
-   public void setMinHeight(int minHeight)
-   {
-      this.minHeight = minHeight;
-   }
-
-   /**
-    * The default processRender for an UIPortletApplication handles two cases:
-    * 
-    *   A. Ajax is used 
-    *   ---------------
-    *     If Ajax is used and that the entire portal should not be re rendered, then an AJAX fragment is 
-    *     generated with information such as the portlet id, the portlet title, the portlet modes, the window 
-    *     states as well as the HTML for the block to render
-    *   
-    *   B. A full render is made
-    *   ------------------------
-    *      a simple call to the method super.processRender(context) which will delegate the call to all the 
-    *      Lifecycle components
-    *   
-    */
-   public void processRender(WebuiApplication app, WebuiRequestContext context) throws Exception
-   {
-      WebuiRequestContext pContext = (WebuiRequestContext)context.getParentAppRequestContext();
-      if (context.useAjax() && !pContext.getFullRender())
-      {
-         Writer w = context.getWriter();
-
-         Set<UIComponent> list = context.getUIComponentToUpdateByAjax();
-         //      if(list == null) list = app.getDefaultUIComponentToUpdateByAjax(context) ;
-         if (list != null)
-         {
-            if (getUIPopupMessages().hasMessage())
-               context.addUIComponentToUpdateByAjax(getUIPopupMessages());
-            for (UIComponent uicomponent : list)
-            {
-               renderBlockToUpdate(uicomponent, context, w);
-            }
-            return;
-         }
-      }
-      super.processRender(context);
-   }
-}
\ No newline at end of file

Modified: portal/trunk/webui/pom.xml
===================================================================
--- portal/trunk/webui/pom.xml	2010-07-22 10:59:56 UTC (rev 3681)
+++ portal/trunk/webui/pom.xml	2010-07-22 12:05:39 UTC (rev 3682)
@@ -36,6 +36,7 @@
 
    <modules>
       <module>framework</module>
+      <module>portlet</module>
       <module>core</module>
       <module>eXo</module>
       <module>portal</module>


Property changes on: portal/trunk/webui/portlet
___________________________________________________________________
Name: svn:ignore
   + *.iml
target


Added: portal/trunk/webui/portlet/pom.xml
===================================================================
--- portal/trunk/webui/portlet/pom.xml	                        (rev 0)
+++ portal/trunk/webui/portlet/pom.xml	2010-07-22 12:05:39 UTC (rev 3682)
@@ -0,0 +1,40 @@
+<!--
+
+    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.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.exoplatform.portal</groupId>
+    <artifactId>exo.portal.webui</artifactId>
+    <version>3.2.0-Beta01-SNAPSHOT</version>
+  </parent>
+  
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>exo.portal.webui.portlet</artifactId>
+  <packaging>jar</packaging>
+  <name>GateIn Portal WebUI Portlet</name>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.webui.framework</artifactId>
+    </dependency>
+  </dependencies>
+</project>

Copied: portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet (from rev 3675, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet)

Deleted: portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java	2010-07-22 08:00:54 UTC (rev 3675)
+++ portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java	2010-07-22 12:05:39 UTC (rev 3682)
@@ -1,222 +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.application.portlet;
-
-import org.exoplatform.commons.utils.WriterPrinter;
-import org.exoplatform.services.resources.Orientation;
-import org.exoplatform.web.application.URLBuilder;
-import org.exoplatform.webui.application.WebuiApplication;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.UIComponent;
-
-import java.io.Writer;
-
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletModeException;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletResponse;
-import javax.portlet.RenderResponse;
-import javax.portlet.StateAwareResponse;
-
-/**
- * The request context of a portlet
- *
- */
-public class PortletRequestContext extends WebuiRequestContext
-{
-   /**
-    * Portlet Window ID
-    */
-   private String windowId_;
-
-   /**
-    * The request
-    */
-   private PortletRequest request_;
-
-   /**
-    * The response
-    */
-   private PortletResponse response_;
-
-   private Writer writer_;
-
-   private boolean hasProcessAction_ = false;
-
-   private final PortletURLBuilder urlBuilder;
-
-   public PortletRequestContext(WebuiApplication app, Writer writer, PortletRequest req, PortletResponse res)
-   {
-      super(app);
-      init(writer, req, res);
-      setSessionId(req.getPortletSession(true).getId());
-
-      urlBuilder = new PortletURLBuilder();
-   }
-
-   public void init(Writer writer, PortletRequest req, PortletResponse res)
-   {
-      request_ = req;
-      response_ = res;
-      writer_ = new WriterPrinter(writer);
-      windowId_ = req.getWindowID();
-   }
-
-   public void setUIApplication(UIApplication uiApplication) throws Exception
-   {
-      uiApplication_ = uiApplication;
-      appRes_ = getApplication().getResourceBundle(getParentAppRequestContext().getLocale());
-   }
-
-   final public String getRequestParameter(String name)
-   {
-      return request_.getParameter(name);
-   }
-
-   final public String[] getRequestParameterValues(String name)
-   {
-      return request_.getParameterValues(name);
-   }
-
-   public Orientation getOrientation()
-   {
-      return parentAppRequestContext_.getOrientation();
-   }
-
-   public String getRequestContextPath()
-   {
-      return request_.getContextPath();
-   }
-
-   @Override
-   public String getPortalContextPath()
-   {
-      if (parentAppRequestContext_ instanceof WebuiRequestContext)
-      {
-         return ((WebuiRequestContext)parentAppRequestContext_).getPortalContextPath();
-      }
-      else
-      {
-         return null;
-      }
-   }
-
-   @SuppressWarnings("unchecked")
-   public PortletRequest getRequest()
-   {
-      return request_;
-   }
-
-   @SuppressWarnings("unchecked")
-   public PortletResponse getResponse()
-   {
-      return response_;
-   }
-
-   public String getRemoteUser()
-   {
-      return parentAppRequestContext_.getRemoteUser();
-   }
-
-   final public boolean isUserInRole(String roleUser)
-   {
-      return request_.isUserInRole(roleUser);
-   }
-
-   public PortletMode getApplicationMode()
-   {
-      return request_.getPortletMode();
-   }
-
-   public void setApplicationMode(PortletMode mode) throws PortletModeException
-   {
-      if (response_ instanceof StateAwareResponse)
-      {
-         StateAwareResponse res = (StateAwareResponse)response_;
-         res.setPortletMode(mode);
-      }
-      else
-      {
-         throw new PortletModeException(
-            "The portlet don't support to set a portlet mode by current runtime environment", mode);
-      }
-   }
-
-   public Writer getWriter() throws Exception
-   {
-      return writer_;
-   }
-   
-   public void setWriter(Writer writer)
-   {
-	   this.writer_ = writer;
-   }
-
-   final public boolean useAjax()
-   {
-      return getParentAppRequestContext().useAjax();
-   }
-
-   public void sendRedirect(String url) throws Exception
-   {
-      setResponseComplete(true);
-      if (response_ instanceof ActionResponse)
-         ((ActionResponse)response_).sendRedirect(url);
-   }
-
-   public boolean hasProcessAction()
-   {
-      return hasProcessAction_;
-   }
-
-   public void setProcessAction(boolean b)
-   {
-      hasProcessAction_ = b;
-   }
-
-   public URLBuilder<UIComponent> getURLBuilder()
-   {
-      RenderResponse renderRes = (RenderResponse)response_;
-      urlBuilder.setBaseURL(renderRes.createActionURL().toString());
-      return urlBuilder;
-   }
-
-   /**
-    * Puts the component to update inside the parent request context
-    * 
-    * Here it will be the PortalRequestHandler and hence it will be responsible of
-    * making the distinction between 3rd parties portlets (that need a full portlet fragment refresh)
-    *  and our portlets that also allow some UIComponent within the portlet to be refreshed
-    */
-   //  public void addUIComponentToUpdateByAjax(UIComponent uicomponent) {   
-   //	((WebuiRequestContext)getParentAppRequestContext()).addUIComponentToUpdateByAjax(uicomponent);
-   //  }  
-   //  
-   //  public List<UIComponent>  getUIComponentToUpdateByAjax() {  
-   //	return ((WebuiRequestContext)getParentAppRequestContext()).getUIComponentToUpdateByAjax() ;
-   //  }
-
-   public String getWindowId()
-   {
-      return windowId_;
-   }
-}

Copied: portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java (from rev 3676, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java)
===================================================================
--- portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java	                        (rev 0)
+++ portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java	2010-07-22 12:05:39 UTC (rev 3682)
@@ -0,0 +1,222 @@
+/*
+ * 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.application.portlet;
+
+import org.exoplatform.commons.utils.WriterPrinter;
+import org.exoplatform.services.resources.Orientation;
+import org.exoplatform.web.application.URLBuilder;
+import org.exoplatform.webui.application.WebuiApplication;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIComponent;
+
+import java.io.Writer;
+
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletModeException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.RenderResponse;
+import javax.portlet.StateAwareResponse;
+
+/**
+ * The request context of a portlet
+ *
+ */
+public class PortletRequestContext extends WebuiRequestContext
+{
+   /**
+    * Portlet Window ID
+    */
+   private String windowId_;
+
+   /**
+    * The request
+    */
+   private PortletRequest request_;
+
+   /**
+    * The response
+    */
+   private PortletResponse response_;
+
+   private Writer writer_;
+
+   private boolean hasProcessAction_ = false;
+
+   private final PortletURLBuilder urlBuilder;
+
+   public PortletRequestContext(WebuiApplication app, Writer writer, PortletRequest req, PortletResponse res)
+   {
+      super(app);
+      init(writer, req, res);
+      setSessionId(req.getPortletSession(true).getId());
+
+      urlBuilder = new PortletURLBuilder();
+   }
+
+   public void init(Writer writer, PortletRequest req, PortletResponse res)
+   {
+      request_ = req;
+      response_ = res;
+      writer_ = new WriterPrinter(writer);
+      windowId_ = req.getWindowID();
+   }
+
+   public void setUIApplication(UIApplication uiApplication) throws Exception
+   {
+      uiApplication_ = uiApplication;
+      appRes_ = getApplication().getResourceBundle(getParentAppRequestContext().getLocale());
+   }
+
+   final public String getRequestParameter(String name)
+   {
+      return request_.getParameter(name);
+   }
+
+   final public String[] getRequestParameterValues(String name)
+   {
+      return request_.getParameterValues(name);
+   }
+
+   public Orientation getOrientation()
+   {
+      return parentAppRequestContext_.getOrientation();
+   }
+
+   public String getRequestContextPath()
+   {
+      return request_.getContextPath();
+   }
+
+   @Override
+   public String getPortalContextPath()
+   {
+      if (parentAppRequestContext_ instanceof WebuiRequestContext)
+      {
+         return ((WebuiRequestContext)parentAppRequestContext_).getPortalContextPath();
+      }
+      else
+      {
+         return null;
+      }
+   }
+
+   @SuppressWarnings("unchecked")
+   public PortletRequest getRequest()
+   {
+      return request_;
+   }
+
+   @SuppressWarnings("unchecked")
+   public PortletResponse getResponse()
+   {
+      return response_;
+   }
+
+   public String getRemoteUser()
+   {
+      return parentAppRequestContext_.getRemoteUser();
+   }
+
+   final public boolean isUserInRole(String roleUser)
+   {
+      return request_.isUserInRole(roleUser);
+   }
+
+   public PortletMode getApplicationMode()
+   {
+      return request_.getPortletMode();
+   }
+
+   public void setApplicationMode(PortletMode mode) throws PortletModeException
+   {
+      if (response_ instanceof StateAwareResponse)
+      {
+         StateAwareResponse res = (StateAwareResponse)response_;
+         res.setPortletMode(mode);
+      }
+      else
+      {
+         throw new PortletModeException(
+            "The portlet don't support to set a portlet mode by current runtime environment", mode);
+      }
+   }
+
+   public Writer getWriter() throws Exception
+   {
+      return writer_;
+   }
+   
+   public void setWriter(Writer writer)
+   {
+	   this.writer_ = writer;
+   }
+
+   final public boolean useAjax()
+   {
+      return getParentAppRequestContext().useAjax();
+   }
+
+   public void sendRedirect(String url) throws Exception
+   {
+      setResponseComplete(true);
+      if (response_ instanceof ActionResponse)
+         ((ActionResponse)response_).sendRedirect(url);
+   }
+
+   public boolean hasProcessAction()
+   {
+      return hasProcessAction_;
+   }
+
+   public void setProcessAction(boolean b)
+   {
+      hasProcessAction_ = b;
+   }
+
+   public URLBuilder<UIComponent> getURLBuilder()
+   {
+      RenderResponse renderRes = (RenderResponse)response_;
+      urlBuilder.setBaseURL(renderRes.createActionURL().toString());
+      return urlBuilder;
+   }
+
+   /**
+    * Puts the component to update inside the parent request context
+    * 
+    * Here it will be the PortalRequestHandler and hence it will be responsible of
+    * making the distinction between 3rd parties portlets (that need a full portlet fragment refresh)
+    *  and our portlets that also allow some UIComponent within the portlet to be refreshed
+    */
+   //  public void addUIComponentToUpdateByAjax(UIComponent uicomponent) {   
+   //	((WebuiRequestContext)getParentAppRequestContext()).addUIComponentToUpdateByAjax(uicomponent);
+   //  }  
+   //  
+   //  public List<UIComponent>  getUIComponentToUpdateByAjax() {  
+   //	return ((WebuiRequestContext)getParentAppRequestContext()).getUIComponentToUpdateByAjax() ;
+   //  }
+
+   public String getWindowId()
+   {
+      return windowId_;
+   }
+}

Copied: portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java (from rev 3675, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java)
===================================================================
--- portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java	                        (rev 0)
+++ portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java	2010-07-22 12:05:39 UTC (rev 3682)
@@ -0,0 +1,109 @@
+/*
+ * 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;
+
+import org.exoplatform.webui.application.WebuiApplication;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
+
+import java.io.Writer;
+import java.util.Set;
+
+ at Serialized
+abstract public class UIPortletApplication extends UIApplication
+{
+   private int minWidth = 300;
+
+   private int minHeight = 300;
+
+   static public String VIEW_MODE = "ViewMode";
+
+   static public String EDIT_MODE = "EditMode";
+
+   static public String HELP_MODE = "HelpMode";
+
+   static public String CONFIG_MODE = "ConfigMode";
+
+   public UIPortletApplication() throws Exception
+   {
+   }
+
+   @Deprecated
+   public int getMinWidth()
+   {
+      return minWidth;
+   }
+   
+   @Deprecated
+   public void setMinWidth(int minWidth)
+   {
+      this.minWidth = minWidth;
+   }
+   
+   @Deprecated
+   public int getMinHeight()
+   {
+      return minHeight;
+   }
+   
+   @Deprecated
+   public void setMinHeight(int minHeight)
+   {
+      this.minHeight = minHeight;
+   }
+
+   /**
+    * The default processRender for an UIPortletApplication handles two cases:
+    * 
+    *   A. Ajax is used 
+    *   ---------------
+    *     If Ajax is used and that the entire portal should not be re rendered, then an AJAX fragment is 
+    *     generated with information such as the portlet id, the portlet title, the portlet modes, the window 
+    *     states as well as the HTML for the block to render
+    *   
+    *   B. A full render is made
+    *   ------------------------
+    *      a simple call to the method super.processRender(context) which will delegate the call to all the 
+    *      Lifecycle components
+    *   
+    */
+   public void processRender(WebuiApplication app, WebuiRequestContext context) throws Exception
+   {
+      WebuiRequestContext pContext = (WebuiRequestContext)context.getParentAppRequestContext();
+      if (context.useAjax() && !pContext.getFullRender())
+      {
+         Writer w = context.getWriter();
+
+         Set<UIComponent> list = context.getUIComponentToUpdateByAjax();
+         //      if(list == null) list = app.getDefaultUIComponentToUpdateByAjax(context) ;
+         if (list != null)
+         {
+            if (getUIPopupMessages().hasMessage())
+               context.addUIComponentToUpdateByAjax(getUIPopupMessages());
+            for (UIComponent uicomponent : list)
+            {
+               renderBlockToUpdate(uicomponent, context, w);
+            }
+            return;
+         }
+      }
+      super.processRender(context);
+   }
+}
\ No newline at end of file



More information about the gatein-commits mailing list