You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/07/11 08:56:35 UTC
svn commit: r210074 - in
/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest:
AjaxInputSuggestRenderer.java resource/controls.js
Author: mmarinschek
Date: Sun Jul 10 23:56:32 2005
New Revision: 210074
URL: http://svn.apache.org/viewcvs?rev=210074&view=rev
Log:
AjaxInputSuggest works fully now...
Modified:
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java?rev=210074&r1=210073&r2=210074&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java Sun Jul 10 23:56:32 2005
@@ -138,7 +138,8 @@
out.writeText("', {\n" +
" method: 'post',\n" +
" asynchronous: true,\n" +
- " parameters: '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)" +
+ " 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);
out.endElement(HTML.SCRIPT_ELEM);
}
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js?rev=210074&r1=210073&r2=210074&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js Sun Jul 10 23:56:32 2005
@@ -334,12 +334,7 @@
entry = encodeURIComponent(this.element.name) + '=' +
encodeURIComponent(this.getEntry());
- if(this.options.parameters && this.options.parameters.length>0){
- this.options.parameters += '&';
- } else {
- this.options.parameters = '';
- }
- this.options.parameters += this.options.callback ?
+ this.options.parameters = this.options.callback ?
this.options.callback(this.element, entry) : entry;
new Ajax.Request(this.url, this.options);