myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r294923 - /myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxRenderer.java
Date Tue, 04 Oct 2005 21:30:01 GMT
Author: schof
Date: Tue Oct  4 14:29:58 2005
New Revision: 294923

URL: http://svn.apache.org/viewcvs?rev=294923&view=rev
Log:
Fixes MYFACES-643 (Patch by Chris Barlow)

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

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxRenderer.java?rev=294923&r1=294922&r2=294923&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxRenderer.java
(original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxRenderer.java
Tue Oct  4 14:29:58 2005
@@ -153,12 +153,24 @@
         }
         out.writeText("','",null);
         out.writeText(context.getExternalContext().encodeActionURL(actionURL+"?affectedAjaxComponent="+clientId),null);
-        out.writeText("', {\n" +
-                "      method:       'post',\n" +
-                "      asynchronous: true,\n" +
-                "      parameters: '',\n"+
-                "      callback: function(element,entry) {return entry+'&jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'&jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'&jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)}"
+
-                "    })",null);
+        if (context.getApplication().getStateManager().isSavingStateInClient(context))  
         
+        {
+            out.writeText("', {\n" +
+                          "      method:       'post',\n" +
+                          "      asynchronous: true,\n" +
+                          "      parameters: '',\n"+
+                          "      callback: function(element,entry) {return entry+'&jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'&jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'&jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)}"
+
+                          "    })",null);            
+        }
+        else
+        {                        
+            out.writeText("', {\n" +
+                          "      method:       'post',\n" +
+                          "      asynchronous: true,\n" +
+                          "      parameters: '',\n" +
+                          "      callback: function(element,entry) {return entry}" +
+                          "    })", null);
+        }
         out.endElement(HTML.SCRIPT_ELEM);
     }
 



Mime
View raw message