[richfaces-svn-commits] JBoss Rich Faces SVN: r8996 - in branches/3.1.x/test-applications/facelets/src/main: webapp/OrderingList and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Jun 11 06:40:28 EDT 2008


Author: adubovsky
Date: 2008-06-11 06:40:27 -0400 (Wed, 11 Jun 2008)
New Revision: 8996

Modified:
   branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java
   branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml
Log:
Add binding for Ordering List

Modified: branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java	2008-06-11 10:39:23 UTC (rev 8995)
+++ branches/3.1.x/test-applications/facelets/src/main/java/orderingList/OrderingList.java	2008-06-11 10:40:27 UTC (rev 8996)
@@ -5,7 +5,11 @@
 import java.util.Iterator;
 
 import javax.faces.component.html.HtmlDataTable;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
 
+import org.richfaces.component.html.HtmlOrderingList;
+
 import util.data.Data;
 
 public class OrderingList{
@@ -30,7 +34,34 @@
 	private boolean facet;
 	private boolean showAllData;
 	private boolean showSelect;
+	private String bindLabel;
+	private HtmlOrderingList myOrderingList;
 	
+	public void bindingCheck(ActionEvent actionEvent){
+		FacesContext faces = FacesContext.getCurrentInstance();
+		bindLabel = myOrderingList.getBaseClientId(faces);
+		System.out.println("============OL Binding Check===========");
+		System.out.println(myOrderingList.getBaseClientId(faces));
+		System.out.println("============OL Binding Check===========");
+		//System.out.println(activeItem.toString());
+	}
+	
+	public HtmlOrderingList getMyOrderingList() {
+		return myOrderingList;
+	}
+
+	public void setMyOrderingList(HtmlOrderingList myOrderingList) {
+		this.myOrderingList = myOrderingList;
+	}
+	
+	public String getBindLabel() {
+		return bindLabel;
+	}
+
+	public void setBindLabel(String bindLabel) {
+		this.bindLabel = bindLabel;
+	}
+	
 	public boolean isFacet() {
 		return facet;
 	}
@@ -70,6 +101,7 @@
 	
 	public OrderingList() {
 		this.info = new ArrayList<String>();
+		this.bindLabel = "Not checked";
 		this.captionLabel = "captionLabel";
 		this.lenght = 10;
 		this.listHeight = "300"; 

Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml	2008-06-11 10:39:23 UTC (rev 8995)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/OrderingList/OrderingList.xhtml	2008-06-11 10:40:27 UTC (rev 8996)
@@ -15,7 +15,8 @@
 		rendered="#{orderingList.rendered}" showButtonLabels="#{orderingList.showButtonLabels}" selection="#{orderingList.selection}"
 		onmousemove="showEvent('onmousemoveInputID', 'onmousemove work!')" onclick="showEvent('onclickInputID', 'onclick work!')" 
 		ondblclick="showEvent('ondblclickInputID', 'ondblclick work!')" onmouseout="showEvent('onmouseoutInputID', 'onmouseout work!')" 
-		onmouseover="showEvent('onmouseoverInputID', 'onmouseover work!')" onorderchanged="showEvent('onorderchangedInputID', 'onorderchanged work!')" ontopclick="showEvent('ontopclickInputID', 'ontopclick work!')" onupclick="showEvent('onupclickInputID', 'onupclick work!')" ondownclick="showEvent('ondownclickInputID', 'ondownclick work!')" onbottomclick="showEvent('onbottomclickInputID', 'onbottomclick work!')" onheaderclick="showEvent('onheaderclickInputID', 'onheaderclick work!')">
+		onmouseover="showEvent('onmouseoverInputID', 'onmouseover work!')" onorderchanged="showEvent('onorderchangedInputID', 'onorderchanged work!')" ontopclick="showEvent('ontopclickInputID', 'ontopclick work!')" onupclick="showEvent('onupclickInputID', 'onupclick work!')" ondownclick="showEvent('ondownclickInputID', 'ondownclick work!')" onbottomclick="showEvent('onbottomclickInputID', 'onbottomclick work!')" onheaderclick="showEvent('onheaderclickInputID', 'onheaderclick work!')"
+		binding="#{orderingList.myOrderingList}">
 		<f:facet name="header">
 			<h:outputText value="header" />
 		</f:facet>
@@ -86,6 +87,13 @@
 			<h:graphicImage value="#{item.str3}" />
 		</h:column>
 	</rich:orderingList>
+	
+	<h:panelGrid columns="2">
+		<a4j:commandButton reRender="outBindingCheck" actionListener="#{orderingList.bindingCheck}"
+			value="binding Check" />
+		<h:outputText id="outBindingCheck" value="#{orderingList.bindLabel}" />
+	</h:panelGrid>
+	
 	<h:panelGrid columns="3">
 		<h:column></h:column>
 		<h:outputText value="JavaScript API"></h:outputText>




More information about the richfaces-svn-commits mailing list