You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by to...@apache.org on 2005/11/02 13:43:28 UTC

svn commit: r330245 - /myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajax/util/AjaxRendererUtils.java

Author: tomsp
Date: Wed Nov  2 04:43:22 2005
New Revision: 330245

URL: http://svn.apache.org/viewcvs?rev=330245&view=rev
Log:
fixed compile errors

Modified:
    myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajax/util/AjaxRendererUtils.java

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajax/util/AjaxRendererUtils.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajax/util/AjaxRendererUtils.java?rev=330245&r1=330244&r2=330245&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajax/util/AjaxRendererUtils.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajax/util/AjaxRendererUtils.java Wed Nov  2 04:43:22 2005
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.myfaces.custom.ajax.util;
 
 import org.apache.myfaces.component.html.util.AddResource;
@@ -22,9 +37,8 @@
 import java.util.Iterator;
 
 /**
- * User: treeder
- * Date: Oct 31, 2005
- * Time: 1:52:07 PM
+ * @author Travis Reeder (latest modification by $Author: mmarinschek $)
+ * @version $Revision: 290397 $ $Date: 2005-09-20 10:35:09 +0200 (Di, 20 Sep 2005) $
  */
 public class AjaxRendererUtils
 {
@@ -61,11 +75,11 @@
     public static void writeAjaxScript(FacesContext context, ResponseWriter out, AjaxCallbacks component, String extraParams) throws IOException
     {
         UIComponent uiComponent = (UIComponent) component;
-        String clientId = uiComponent.getClientId(context);
+        //String clientId = uiComponent.getClientId(context);
         String viewId = context.getViewRoot().getViewId();
         ViewHandler viewHandler = context.getApplication().getViewHandler();
-        String actionURL = viewHandler.getActionURL(context, viewId);
-        String ajaxURL = actionURL;
+        //String actionURL = viewHandler.getActionURL(context, viewId);
+        String ajaxURL = viewHandler.getActionURL(context, viewId);
 
         String jsNameSpace = uiComponent.getId() + "_MyFaces_inputAjax_";
 
@@ -207,25 +221,35 @@
             while (iter.hasNext())
             {
                 FacesMessage msg = (FacesMessage) iter.next();
-                buff.append("<error elname=\"").append(request.getParameter("elname"))
-                        .append("\" severity=\"").append(msg.getSeverity().toString())
-                        .append("\" summary=\"").append(msg.getSummary())
-                        .append("\" />");
+                buff.write("<error elname=\"");
+                buff.write(request.getParameter("elname"));
+                buff.write("\" severity=\"");
+                buff.write(msg.getSeverity().toString());
+                buff.write("\" summary=\"");
+                buff.write(msg.getSummary());
+                buff.write("\" />");
                 buff.println();
             }
-            buff.append("<elementUpdated elname=\"").append(request.getParameter("elname"));
-            buff.append("\" elvalue=\"").append(request.getParameter("elvalue")).append("\"");
+            buff.write("<elementUpdated elname=\"");
+            buff.write(request.getParameter("elname"));
+            buff.write("\" elvalue=\"");
+            buff.write(request.getParameter("elvalue"));
+            buff.write("\"");
             if (extraReturnAttributes != null)
             {
                 Iterator iter2 = extraReturnAttributes.keySet().iterator();
                 while (iter2.hasNext())
                 {
                     String key = (String) iter2.next();
-                    buff.append(" ").append(key).append("=\"").append(extraReturnAttributes.get(key).toString()).append("\"");
+                    buff.write(" ");
+                    buff.write(key);
+                    buff.write("=\"");
+                    buff.write(extraReturnAttributes.get(key).toString());
+                    buff.write("\"");
                 }
             }
 
-            buff.append(" />");
+            buff.write(" />");
             buff.println();
             buff.println("</response>");
             String output = sw.toString();