Author: pyaschenko
Date: 2008-03-04 10:16:49 -0500 (Tue, 04 Mar 2008)
New Revision: 6532
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
RF-1791
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-03-04
15:06:25 UTC (rev 6531)
+++
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-03-04
15:16:49 UTC (rev 6532)
@@ -555,6 +555,11 @@
var input = $(this.options.selection);
input.value = this.index;
+ var value="";
+ if ( this.fetchValues && (value=this.fetchValues[this.index]) )
+ {
+ $(this.content+"_hiddenFetchValue").value = value;
+ }
this.updateElement(this.getCurrentEntry());
if (this.options.onselect) {
@@ -727,7 +732,7 @@
A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
},
- onComplete: function(request, event) {
+ onComplete: function(request, event, data) {
LOG.debug("AJAX response complete - updateChoices");
// Calculate height of choices window
if (!this.update.style.position || this.update.style.position
@@ -736,6 +741,7 @@
RichFaces.Position.smartClone(this.element, this.update, this.options);
}
this.updateChoices();
+ this.fetchValues = data;
LOG.debug("Choices updated");
if (this.options.onajaxcomplete) {
this.options.onajaxcomplete(request, event);
Show replies by date