[richfaces-svn-commits] JBoss Rich Faces SVN: r5711 - in trunk/sandbox/ui/combobox/src/main: templates and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Jan 29 13:20:03 EST 2008


Author: vmolotkov
Date: 2008-01-29 13:20:03 -0500 (Tue, 29 Jan 2008)
New Revision: 5711

Modified:
   trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
   trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
new valueKepeer is added

Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js	2008-01-29 17:11:48 UTC (rev 5710)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js	2008-01-29 18:20:03 UTC (rev 5711)
@@ -4,7 +4,7 @@
 
 Richfaces.ComboBox.prototype = {
 	
-	initialize: function(combobox, listId, parentListId, fieldId, buttonId, buttonBGId, classes, 
+	initialize: function(combobox, listId, parentListId, valueFieldId, fieldId, buttonId, buttonBGId, classes, 
 						 listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue, 
 						 selectFirstOnUpdate, onlistcall, onselected, defaultMessage, isDisabled, value,
 						 showDelay, hideDelay) {
@@ -13,6 +13,7 @@
 		this.filterNewValue = filterNewValue;
 		
 		this.combobox = $(combobox); 
+		this.comboValue = $(valueFieldId);
 		this.field = $(fieldId);
 		
 		//this.field.prevValue = null;
@@ -271,10 +272,12 @@
 			if (oV == value) {
 				if (Prototype.Browser.Gecko) {
 					this.field.value = "";
+					this.comboValue.value = "";
 				}
 			}
 			this.field.prevValue = value;
 			this.field.value = value;
+			this.comboValue.value = value;
 			this.comboList.doSelectItem(this.comboList.activeItem);
 			this.combobox.fire("rich:onitemselected", {});
 			/*if (oV != value) {
@@ -293,6 +296,7 @@
 	
 	applyDefaultText : function() {
 		this.field.value = this.defaultMessage;
+		this.comboValue.value = "";
 	},
 	
 	isActive : function() {

Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx	2008-01-29 17:11:48 UTC (rev 5710)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx	2008-01-29 18:20:03 UTC (rev 5711)
@@ -205,6 +205,7 @@
 		
 <div id="control#{clientId}" class="rich-combobox-list-width rich-combobox-font rich-combobox #{styleClass}" style="width:#{listWidth};#{style}"
 	 x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled,onchange">
+	<input id="comboboxValue#{clientId}" name="comboboxValue#{clientId}" type="hidden"/>
 	<div class="rich-combobox-list-cord"></div>
 	<div class="rich-combobox-input-width rich-combobox-font rich-combobox-shell" style="width:#{width};z-index:1;">
 		<input id="comboboxField#{clientId}" 
@@ -299,6 +300,7 @@
 		var combobox = new Richfaces.ComboBox( "control#{clientId}", 
 							   				   "list#{clientId}", 
 							   				   "listParent#{clientId}",
+							   				   "comboboxValue#{clientId}",
 											   "comboboxField#{clientId}", 
 											   "comboboxButton#{clientId}", 
 											   "comboBoxButtonBG#{clientId}",




More information about the richfaces-svn-commits mailing list