[richfaces-svn-commits] JBoss Rich Faces SVN: r9249 - in trunk/test-applications/jsp/src/main: java/dataTable and 3 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jun 26 11:14:12 EDT 2008


Author: mvitenkov
Date: 2008-06-26 11:14:12 -0400 (Thu, 26 Jun 2008)
New Revision: 9249

Modified:
   trunk/test-applications/jsp/src/main/java/custom/Custom.java
   trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java
   trunk/test-applications/jsp/src/main/java/tree/Bean.java
   trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp
   trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp
Log:
Tree: adviseNodeOpened + adviseNodeSelected
Custom: RF-3792 test

Modified: trunk/test-applications/jsp/src/main/java/custom/Custom.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/custom/Custom.java	2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/java/custom/Custom.java	2008-06-26 15:14:12 UTC (rev 9249)
@@ -1,5 +1,10 @@
 package custom;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
 public class Custom {
 
 	private int index;
@@ -12,7 +17,19 @@
 	private int i0;
 	private int i1;
 	private int i2;
+	private List<String> results;
+	private ArrayList<SelectItem> itemsList;
 
+	public List<String> getResults() {
+		return results;
+	}
+
+	public void setResults(List<String> results) {
+		System.out.println("PickListBean.setResults()");
+		System.out.println(results.size()); 
+		this.results = results;
+	}
+
 	public Custom() {
 		this.index = 0;
 		this.b0 = true;
@@ -24,6 +41,12 @@
 		this.i0 = 0;
 		this.i1 = 1;
 		this.i2 = 2;
+		results = new ArrayList();
+		itemsList = new ArrayList();
+		
+		for(int i=0;i<10;i++){
+			itemsList.add(new SelectItem("item #" + i));
+		}		
 	}
 
 	public Custom(int index) {
@@ -148,4 +171,12 @@
 		this.index = index;
 	}
 
+	public ArrayList<SelectItem> getItemsList() {
+		return itemsList;
+	}
+
+	public void setItemsList(ArrayList<SelectItem> itemsList) {
+		this.itemsList = itemsList;
+	}	
+
 }

Modified: trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java	2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java	2008-06-26 15:14:12 UTC (rev 9249)
@@ -39,7 +39,8 @@
 		Enumeration keys = properties.keys();
 		for(int i=0;i<7;i++){
 			Data bean = new Data();
-			int l = (int)(Math.random()*8)+1;
+			//int l = (int)(Math.random()*8)+1;
+			int l = 1;
 			bean.setTotal(0);
 			bean.setMounth(DataTable.mNames[i]);
 			bean.setDay(DataTable.mDay[i]);
@@ -54,7 +55,7 @@
 				bean.getDetail().add(child);
 			}
 		}
-		for(int i=0;i<16;i++){
+		for(int i=0;i<1;i++){
 			numbers.add(new Integer(i));
 		}
 	}

Modified: trunk/test-applications/jsp/src/main/java/tree/Bean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tree/Bean.java	2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/java/tree/Bean.java	2008-06-26 15:14:12 UTC (rev 9249)
@@ -43,7 +43,9 @@
 	private int counter = 0;
 	private String expandPath;
 	private UITree tree;
-
+	private Boolean adviseNodeSelected;
+	private Boolean adviseNodeOpened;
+	
 	public Bean() {
 		try {
 			FacesContext context = FacesContext.getCurrentInstance();
@@ -62,8 +64,10 @@
 			e.printStackTrace();
 		}
 
+		
+		
 		data1 = new TreeNodeImpl();
-		data1.setData("Root node");
+		data1.setData("Root node");		
 		for (int i = 0; i < 10; i++) {
 			TreeNodeImpl child = new TreeNodeImpl() {
 
@@ -91,6 +95,14 @@
 		}
 	}
 
+	public Boolean adviseNodeSelected(UITree tree){
+		System.out.println("Bean.adviseNodeSelected()");
+		return Boolean.FALSE;
+	}
+	public Boolean adviseNodeOpened(UITree tree){
+		System.out.println("Bean.adviseNodeOpened()");
+		return Boolean.FALSE;
+	}
 	public String getIcon() {
 		return icon;
 	}
@@ -330,5 +342,7 @@
 	public void setRenderFacets(boolean renderFacets) {
 		this.renderFacets = renderFacets;
 	}
+
 	
+	
 }

Modified: trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp	2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp	2008-06-26 15:14:12 UTC (rev 9249)
@@ -10,18 +10,20 @@
 	</head>
 	<body>
 	<rich:modalPanel id="modalPanel2ID" minHeight="100" minWidth="200"
-		resizeable="true" keepVisualState="true" showWhenRendered="true" binding="#{modalPanel.myModalPanel}">
+		resizeable="true" keepVisualState="true" showWhenRendered="true"
+		binding="#{modalPanel.myModalPanel}">
 		<h:form>
-		
-		<h:commandButton actionListener="#{modalPanel.checkBinding}" value="Binding"></h:commandButton>
-		<h:outputText value="#{modalPanel.bindLabel}"/>
-		
-		<h:outputLink
-			onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;"
-			value="Close">
-			<f:verbatim>Close</f:verbatim>
-		</h:outputLink>
-		</h:form>		
+
+			<h:commandButton actionListener="#{modalPanel.checkBinding}"
+				value="Binding"></h:commandButton>
+			<h:outputText value="#{modalPanel.bindLabel}" />
+
+			<h:outputLink
+				onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;"
+				value="Close">
+				<f:verbatim>Close</f:verbatim>
+			</h:outputLink>
+		</h:form>
 	</rich:modalPanel>
 
 	<rich:modalPanel id="mpm" width="500" height="300">
@@ -55,11 +57,18 @@
 
 		<a onclick="Richfaces.showModalPanel('modalPanel2ID');" href="#">Show
 		MP(binding)</a>
-		<br/>
+		<br />
 		<a onclick="Richfaces.showModalPanel('mpm');" href="#">Show
 		MP(fileUpload)</a>
 
 	</h:form>
+	<br />
+	<h:form>
+		<h:selectManyListbox value="#{custom.results}">
+			<f:selectItems value="#{custom.itemsList}" />
+			<a4j:support event="onchange"></a4j:support>
+		</h:selectManyListbox>
+	</h:form>
 	</body>
 </f:view>
 </html>

Modified: trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp	2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp	2008-06-26 15:14:12 UTC (rev 9249)
@@ -60,7 +60,8 @@
 		onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
 		onbeforedomupdate="#{event.onbeforedomupdate}"
 		oncomplete="#{event.oncomplete}" ondropout="#{event.ondropout}"
-		ondropover="#{event.ondropover}">
+		ondropover="#{event.ondropover}" adviseNodeOpened="#{bean.adviseNodeOpened}"
+		adviseNodeSelected="#{bean.adviseNodeSelected}">
 		<!-- 
 			<f:facet name="icon">
 				<h:outputText value="icon" rendered="#{bean.renderFacets}" />




More information about the richfaces-svn-commits mailing list