[richfaces-svn-commits] JBoss Rich Faces SVN: r13719 - in trunk: samples/combobox-sample/src/main/webapp/pages and 3 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Apr 21 08:13:03 EDT 2009


Author: ilya_shaikovsky
Date: 2009-04-21 08:13:03 -0400 (Tue, 21 Apr 2009)
New Revision: 13719

Modified:
   trunk/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java
   trunk/samples/combobox-sample/src/main/webapp/pages/index.xhtml
   trunk/ui/combobox/src/main/config/component/combobox.xml
   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
   trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
https://jira.jboss.org/jira/browse/RF-6736

Modified: trunk/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java
===================================================================
--- trunk/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java	2009-04-21 12:01:50 UTC (rev 13718)
+++ trunk/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java	2009-04-21 12:13:03 UTC (rev 13719)
@@ -49,6 +49,15 @@
 	private String inputSize;
 	private String onchangeScript;
 	private String onlistcallScript;
+	private String onlistcloseScript;
+	public String getOnlistcloseScript() {
+		return onlistcloseScript;
+	}
+
+	public void setOnlistcloseScript(String onlistcloseScript) {
+		this.onlistcloseScript = onlistcloseScript;
+	}
+
 	private String onitemselectedScript;
 	
 	

Modified: trunk/samples/combobox-sample/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/combobox-sample/src/main/webapp/pages/index.xhtml	2009-04-21 12:01:50 UTC (rev 13718)
+++ trunk/samples/combobox-sample/src/main/webapp/pages/index.xhtml	2009-04-21 12:13:03 UTC (rev 13719)
@@ -57,6 +57,9 @@
 					
 					<h:outputText value="onlistcall event script:" />
 					<h:inputText value="#{bean.onlistcallScript}" />
+
+					<h:outputText value="onlistclose event script:" />
+					<h:inputText value="#{bean.onlistcloseScript}" />
 					
 					<h:outputText value="onitemselected event script:" />
 					<h:inputText value="#{bean.onitemselectedScript}" />
@@ -82,6 +85,7 @@
 					inputSize="#{bean.inputSize}"
 					onchange="#{bean.onchangeScript}"
 					onlistcall="#{bean.onlistcallScript}"
+					onlistclose="#{bean.onlistcloseScript}"
 					onitemselected="#{bean.onitemselectedScript}">
 					<f:selectItems  value="#{bean.selectItems}"/>
 					<f:selectItem itemValue="Oregon"/>			  

Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml	2009-04-21 12:01:50 UTC (rev 13718)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml	2009-04-21 12:13:03 UTC (rev 13719)
@@ -110,6 +110,12 @@
 	        	<description>HTML: script expression; a list is called</description>
 		    	<defaultvalue><![CDATA[""]]></defaultvalue>
 		    </property>
+	        <property>
+		    	<name>onlistclose</name>
+		    	<classname>java.lang.String</classname>
+	        	<description>HTML: script expression; a list is closed</description>
+		    	<defaultvalue><![CDATA[""]]></defaultvalue>
+		    </property>
 		    <property>
 		    	<name>onselect</name>
 		    	<classname>java.lang.String</classname>

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	2009-04-21 12:01:50 UTC (rev 13718)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js	2009-04-21 12:13:03 UTC (rev 13719)
@@ -6,7 +6,7 @@
 	
 	initialize: function(combobox, listId, parentListId, valueFieldId, fieldId, buttonId, buttonBGId, shadowId, commonStyles,  userStyles, 
 						 listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue, 
-						 selectFirstOnUpdate, onlistcall, onselected, defaultMessage, isDisabled, value,
+						 selectFirstOnUpdate, onlistcall, onlistclose, onselected, defaultMessage, isDisabled, value,
 						 showDelay, hideDelay) {
 		
 		this.directInputSuggestions = directInputSuggestions;
@@ -29,7 +29,7 @@
 		listWidth = (!listWidth) ? this.getCurrentWidth() : listWidth;
 		
 		this.comboList = new Richfaces.ComboBoxList(listId, parentListId, selectFirstOnUpdate, filterNewValue, this.classes.combolist, listWidth, 
-													listHeight, itemsText, onlistcall, fieldId, shadowId, showDelay, hideDelay);
+													listHeight, itemsText, onlistcall, onlistclose, 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	2009-04-21 12:01:50 UTC (rev 13718)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js	2009-04-21 12:13:03 UTC (rev 13719)
@@ -2,7 +2,7 @@
 Richfaces.ComboBoxList = Class.create();
 Richfaces.ComboBoxList.prototype = {
 	
-	initialize: function(listId, parentListId, selectFirstOnUpdate, filterNewValues, classes, width, height, itemsText, onlistcall, fieldId, shadowId,decorationId,
+	initialize: function(listId, parentListId, selectFirstOnUpdate, filterNewValues, classes, width, height, itemsText, onlistcall, onlistclose, fieldId, shadowId,decorationId,
 						 showDelay, hideDelay) {
 		 
 		this.list = document.getElementById(listId);
@@ -13,10 +13,15 @@
 		this.itemsText = itemsText;
 		this.shadowElem = document.getElementById(shadowId);
 		this.onlistcall = onlistcall; 
+		this.onlistclose = onlistclose; 
 		
 		if (this.onlistcall) {
 			this.listParent.observe("rich:onlistcall", this.onlistcall);
 		}
+
+		if (this.onlistclose) {
+			this.listParent.observe("rich:onlistclose", this.onlistclose);
+		}
 		
 		this.selectFirstOnUpdate = selectFirstOnUpdate;
 		this.filterNewValues = filterNewValues;
@@ -143,6 +148,7 @@
 			this.hide();
 		}.bind(this), this.hideDelay);*/
 		this.hide();
+		this.listParent.fire("rich:onlistclose", {});
 	},
 	
 	hide : function() {
@@ -160,7 +166,6 @@
 		
 		//this.listParent.style.display = "none";
 		Element.hide(this.listParent);
-		
 	},
 	
 	eventOnScroll: function (e) {

Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx	2009-04-21 12:01:50 UTC (rev 13718)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx	2009-04-21 12:13:03 UTC (rev 13719)
@@ -356,6 +356,7 @@
 											   #{filterNewValues}, 
 											   #{selectFirstOnUpdate},
 											   #{this:getAsEventHandler(context, component, "onlistcall")}, 
+											   #{this:getAsEventHandler(context, component, "onlistclose")}, 
 											   #{this:getAsEventHandler(context, component, "onselect")},
 											   "#{defaultLabel}",
 											   #{disabled}, #{convertedValue}, 




More information about the richfaces-svn-commits mailing list