[richfaces-svn-commits] JBoss Rich Faces SVN: r5283 - 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
Thu Jan 10 16:04:20 EST 2008


Author: vmolotkov
Date: 2008-01-10 16:04:20 -0500 (Thu, 10 Jan 2008)
New Revision: 5283

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:
latest changes

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-10 20:55:10 UTC (rev 5282)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js	2008-01-10 21:04:20 UTC (rev 5283)
@@ -3,7 +3,7 @@
 
 Richfaces.ComboBox.prototype = {
 	
-	initialize: function(combobox, listId, parentListId, fieldId, buttonId, classes, listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue, selectFirstOnUpdate, onlistcall, onselected, defaultMessage) {
+	initialize: function(combobox, listId, parentListId, fieldId, buttonId, classes, listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue, selectFirstOnUpdate, onlistcall, onselected, defaultMessage, isDisabled) {
 		this.directInputSuggestions = directInputSuggestions;
 		this.filterNewValue = filterNewValue;
 		
@@ -17,12 +17,11 @@
 		this.defaultMessage = defaultMessage;
 		
 		this.onselected = onselected;
-		this.onchange = onchange;
 		
 		this.isSelection = true;
 		
 		this.classes = classes;
-		
+		this.isDisabled = isDisabled;
 		this.initCombobox();
 	},
 	
@@ -49,7 +48,7 @@
 		}
 		
 		if (this.isDisabled) {
-			this.doDidable();
+			this.doDisable();
 		}
 	},
 	
@@ -196,21 +195,21 @@
 	},
 	
 	doActive : function() {
-		this.button.className = this.classes.BUTTON.CLASS.ACTIVE;
- 		this.field.className = this.classes.FIELD.CLASS.ACTIVE;
+		this.button.className = this.classes.BUTTON.CLASSES.ACTIVE;
+ 		this.field.className = this.classes.FIELD.CLASSES.ACTIVE;
 	},
 	
 	doDisable : function() {
-		this.button.className = this.classes.BUTTON.CLASS.DISABLED;
-		this.field.className = this.classes.FIELD.CLASS.DISABLED;
+		this.button.className = this.classes.BUTTON.CLASSES.DISABLED;
+		this.field.className = this.classes.FIELD.CLASSES.DISABLED;
 		
 		this.button.disabled = true;
 		this.field.disabled = true;
 	},
 	
 	doNormal : function() {
-		this.button.className = this.classes.BUTTON.CLASS.NORMAL;
-		this.field.className = this.classes.FIELD.CLASS.NORMAL;
+		this.button.className = this.classes.BUTTON.CLASSES.NORMAL;
+		this.field.className = this.classes.FIELD.CLASSES.NORMAL;
 		
 		this.button.disabled = false;
 		this.field.disabled = false;

Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx	2008-01-10 20:55:10 UTC (rev 5282)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx	2008-01-10 21:04:20 UTC (rev 5283)
@@ -29,6 +29,9 @@
             Boolean filterNewValues = (Boolean) component.getAttributes().get("filterNewValues");
             variables.setVariable("filterNewValues", filterNewValues);
             
+            Boolean disabled = (Boolean) component.getAttributes().get("disabled");
+            variables.setVariable("disabled", disabled);
+            
             String listHeight = (String) component.getAttributes().get("listHeight");
 			if (listHeight != null) {
 				listHeight = HtmlUtil.qualifySize(listHeight);
@@ -192,6 +195,7 @@
 											   #{selectFirstOnUpdate},
 											   #{this:getAsEventHandler(context, component, "onlistcall")}, 
 											   #{this:getAsEventHandler(context, component, "onitemselected")},
-											   "#{defaultMessage}");
+											   "#{defaultMessage}",
+											   #{disabled});
 	</script>
 </f:root>	
\ No newline at end of file




More information about the richfaces-svn-commits mailing list