Author: pyaschenko
Date: 2008-09-02 08:15:05 -0400 (Tue, 02 Sep 2008)
New Revision: 10270
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
https://jira.jboss.org/jira/browse/RF-4357
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-09-02
10:55:49 UTC (rev 10269)
+++
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-09-02
12:15:05 UTC (rev 10270)
@@ -875,9 +875,9 @@
}
var itm = {text:value, object:this.fetchValues[this.index]}
- var flag = (this.selectedItems[index].text != value ||
this.selectedItems[index].object==null ? true : false);
+ var flag = (!this.selectedItems[index] || this.selectedItems[index].text !=
value || this.selectedItems[index].object==null ? true : false);
this.selectedItemsCache[value] = itm;
- this.selectedItems[index] = itm;
+ if (!this.selectedItems[index]) this.selectedItems.push(itm); else
this.selectedItems[index] = itm;
if (flag)
{
//call user listner