Author: vmolotkov
Date: 2008-05-03 10:30:00 -0400 (Sat, 03 May 2008)
New Revision: 8438
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
http://jira.jboss.com/jira/browse/RF-3077
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
---
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-05-03
14:15:32 UTC (rev 8437)
+++
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-05-03
14:30:00 UTC (rev 8438)
@@ -28,7 +28,7 @@
// fieldDem.height = this.field.offsetHeight;
listWidth = (!listWidth) ? this.getCurrentWidth() : listWidth;
- this.comboList = new Richfaces.ComboBoxList(listId, parentListId, selectFirstOnUpdate,
classes.COMBO_LIST, listWidth,
+ this.comboList = new Richfaces.ComboBoxList(listId, parentListId, selectFirstOnUpdate,
filterNewValue, classes.COMBO_LIST, listWidth,
listHeight, itemsText, onlistcall, fieldId, shadowId, showDelay,
hideDelay);
this.defaultMessage = defaultMessage;
if (value) {
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
---
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-05-03
14:15:32 UTC (rev 8437)
+++
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-05-03
14:30:00 UTC (rev 8438)
@@ -2,7 +2,7 @@
Richfaces.ComboBoxList = Class.create();
Richfaces.ComboBoxList.prototype = {
- initialize: function(listId, parentListId, selectFirstOnUpdate, classes, width, height,
itemsText, onlistcall, fieldId, shadowId,decorationId,
+ initialize: function(listId, parentListId, selectFirstOnUpdate, filterNewValues,
classes, width, height, itemsText, onlistcall, fieldId, shadowId,decorationId,
showDelay, hideDelay) {
this.list = $(listId);
@@ -20,6 +20,8 @@
}
this.selectFirstOnUpdate = selectFirstOnUpdate;
+ this.filterNewValues = filterNewValues;
+
this.classes = classes;
this.isList = false;
@@ -351,9 +353,15 @@
},
resetState : function() {
- var tempList = this.list.cloneNode(false);
- this.listParent.childNodes[1].firstChild.replaceChild(tempList, this.list);
- this.list = $(tempList.id);
+ if (this.filterNewValues) {
+ var tempList = this.list.cloneNode(false);
+ this.listParent.childNodes[1].firstChild.replaceChild(tempList, this.list);
+ this.list = $(tempList.id);
+ } else {
+ if (this.activeItem) {
+ this.doNormalItem(this.activeItem);
+ }
+ }
this.activeItem = null;
this.isList = false;
},