[richfaces-svn-commits] JBoss Rich Faces SVN: r4481 - in branches/3.1.x/samples/orderingListDemo/src/main: webapp/pages and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Dec 4 21:26:26 EST 2007


Author: nbelaevski
Date: 2007-12-04 21:26:26 -0500 (Tue, 04 Dec 2007)
New Revision: 4481

Modified:
   branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java
   branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
Log:
latest changes for orderingList demo

Modified: branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java
===================================================================
--- branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java	2007-12-05 00:58:16 UTC (rev 4480)
+++ branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/OrderingListDemoBean.java	2007-12-05 02:26:26 UTC (rev 4481)
@@ -103,6 +103,10 @@
 		this.onbottomclick = onbottomclick;
 	}
 
+	public void addItem() {
+		this.items.add(new OptionItem("Item " + this.items.size(), new Random().nextInt(2000)));
+	}
+
 	public void clear() {
 		this.items.clear();
 	}

Modified: branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp	2007-12-05 00:58:16 UTC (rev 4480)
+++ branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp	2007-12-05 02:26:26 UTC (rev 4481)
@@ -31,8 +31,6 @@
 			</a4j:outputPanel>
 			
 			<h:form id="form" >
-				<h:inputText required="true" />
-				
 				<h:selectOneRadio binding="#{skinBean.component}" />
 				<h:commandLink action="#{skinBean.change}" value="set skin" />
 				<br />
@@ -182,6 +180,7 @@
 						</ol:orderingList>
 					</h:panelGroup>
 				</h:panelGrid>
+				<h:commandButton value="Add item" action="#{demoBean.addItem}" />
 				<h:commandButton value="Submit" />
 				<h:commandButton value="Submit immediate" immediate="true" />
 				<h3>Ordering lists within a4j:repeat</h3>




More information about the richfaces-svn-commits mailing list