myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r226830 - /myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/AjaxPhaseListener.java
Date Mon, 01 Aug 2005 15:55:40 GMT
Author: mmarinschek
Date: Mon Aug  1 08:55:24 2005
New Revision: 226830

URL: http://svn.apache.org/viewcvs?rev=226830&view=rev
Log: (empty)

Modified:
    myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/AjaxPhaseListener.java

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/AjaxPhaseListener.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/AjaxPhaseListener.java?rev=226830&r1=226829&r2=226830&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/AjaxPhaseListener.java
(original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/AjaxPhaseListener.java
Mon Aug  1 08:55:24 2005
@@ -18,7 +18,10 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.custom.buffer.HtmlBufferResponseWriterWrapper;
+import org.apache.myfaces.custom.autoupdatedatatable.AutoUpdateDataTable;
 import org.apache.myfaces.renderkit.RendererUtils;
+import org.apache.myfaces.taglib.html.ext.HtmlDataTableTag;
+import org.apache.myfaces.application.jsp.JspStateManagerImpl;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIViewRoot;
@@ -45,7 +48,7 @@
          FacesContext context = event.getFacesContext();
 
         if(context.getExternalContext().getRequestParameterMap().containsKey("affectedAjaxComponent"))
-        {
+        {                                 
             UIViewRoot root = context.getViewRoot();
 
             UIComponent ajaxComponent = root.findComponent((String)context.getExternalContext().getRequestParameterMap().get("affectedAjaxComponent"));
@@ -69,7 +72,9 @@
                         ((HttpServletResponse)context.getExternalContext().getResponse()).addHeader(
                                 "Transfer-Encoding", "chunked");
                         PrintWriter writer = ((HttpServletResponse) context.getExternalContext().getResponse()).getWriter();
+                       // buf.delete(buf.indexOf("<"), buf.indexOf(">")+1);
                         writer.print(buf.toString());
+                        //System.out.println("PhaseListener: buf = " + buf.toString());
                         writer.flush();
                         writer.close();
                     }
@@ -81,9 +86,14 @@
             }
             else
             {
+
+
                 log.error("Found component is no ajaxComponent : "+RendererUtils.getPathToComponent(ajaxComponent));
             }
-
+            
+            if (!context.getApplication().getStateManager().isSavingStateInClient(context)){
+                ((JspStateManagerImpl) context.getApplication().getStateManager()).saveSerializedView(context);
+            }
             context.responseComplete();
         }
     }
@@ -101,6 +111,8 @@
      */
     public PhaseId getPhaseId()
     {
+        //return PhaseId.ANY_PHASE;
+        //return PhaseId.RESTORE_VIEW;
         return PhaseId.INVOKE_APPLICATION;
     }
 



Mime
View raw message