Author: a.izobov
Date: 2007-06-01 10:46:24 -0400 (Fri, 01 Jun 2007)
New Revision: 973
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
RF-236 fixed
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-01
12:05:57 UTC (rev 972)
+++
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-01
14:46:24 UTC (rev 973)
@@ -251,7 +251,6 @@
this.changed = true;
this.hasFocus = true;
- this.oldValue = this.element.value;
if (this.observerHandle) {
LOG.debug("clear existing observer");
@@ -498,14 +497,18 @@
onObserverEvent: function(event) {
LOG.debug("Observer event occurs");
this.changed = false;
+ var oldValue = this.element.value;
if (this.getToken().length >= this.options.minChars) {
LOG.debug("Call data for update choices");
- this.startIndicator();
- this.getUpdatedChoices(event);
+ if (this.oldValue != oldValue && oldValue.length > 0) {
+ this.startIndicator();
+ this.getUpdatedChoices(event);
+ }
} else {
this.active = false;
this.hide();
}
+ this.oldValue = oldValue;
this.observerHandle = null;
},
@@ -559,11 +562,9 @@
if (this.onsubmitFunction && ! this.onsubmitFunction()) {
return;
- }
- if (this.oldValue != this.element.value && this.element.value.length > 0) {
- A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
- }
- return;
+ }
+
+ A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
},
onComplete: function(request, event) {
Show replies by date