Author: Alex.Kolonitsky
Date: 2009-09-04 13:16:19 -0400 (Fri, 04 Sep 2009)
New Revision: 15469
Modified:
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
ComboBox: pop up can not be closed if it was opened during combobox rerender.
https://jira.jboss.org/jira/browse/RF-7258
comboBox: onselect event doesn't work
https://jira.jboss.org/jira/browse/RF-7701
Modified:
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
---
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-09-04
16:02:14 UTC (rev 15468)
+++
branches/community/3.3.X/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-09-04
17:16:19 UTC (rev 15469)
@@ -86,12 +86,17 @@
this.field = null;
this.classes = null;
+ this.comboList.hide()
delete this.comboList;
this.combobox.component = null;
this.combobox = null;
},
initHandlers : function() {
+ if (this.onselect) {
+ Event.observe(this.combobox, "rich:onselect",
this.onselect.bindAsEventListener(this));
+ }
+
Event.observe(this.button, "click",
this.buttonClickHandler.bindAsEventListener(this));
Event.observe(this.button, "mouseup",
this.buttonMouseUpHandler.bindAsEventListener(this));
Event.observe(this.button, "mousedown",
this.buttonMousedownHandler.bindAsEventListener(this));
@@ -401,9 +406,9 @@
// this.field.prevValue = value;
// this.field.value = value;
// this.comboValue.value = value;
- this.comboValue.value = value;
- this.comboList.doSelectItem(this.comboList.activeItem);
- this.combobox.fire("rich:onselect", {});
+ this.comboValue.value = value;
+ this.comboList.doSelectItem(this.comboList.activeItem);
+ this.combobox.fire("rich:onselect", {});
}
// else if (this.directInputSuggestions) {
// var startInd = this.field.value.length;