[richfaces-svn-commits] JBoss Rich Faces SVN: r4740 - 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 11 15:16:58 EST 2007
Author: nbelaevski
Date: 2007-12-11 15:16:58 -0500 (Tue, 11 Dec 2007)
New Revision: 4740
Modified:
branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java
branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
Log:
columnClasses/rowClasses handling added
Modified: branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java 2007-12-11 20:16:51 UTC (rev 4739)
+++ branches/3.1.x/samples/orderingListDemo/src/main/java/org/richfaces/Bean.java 2007-12-11 20:16:58 UTC (rev 4740)
@@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Random;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
@@ -40,10 +41,16 @@
"First", "Second", "Third", "Fourth"
};
+ private List zebraItems = new ArrayList();
+
public Bean() {
for (int i = 0; i < 3; i++) {
lists.add(new OrderingListDemoBean());
}
+
+ for (int i = 0; i < 6; i++) {
+ zebraItems.add("Item " + i);
+ }
}
public List getLists() {
@@ -104,4 +111,12 @@
System.out.println("Bean.setActiveItem() " + activeItem);
this.activeItem = activeItem;
}
+
+ public List getZebraItems() {
+ return zebraItems;
+ }
+
+ public void setZebraItems(List zebraItems) {
+ this.zebraItems = zebraItems;
+ }
}
\ No newline at end of file
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-11 20:16:51 UTC (rev 4739)
+++ branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-12-11 20:16:58 UTC (rev 4740)
@@ -19,6 +19,21 @@
font-weight: bold;
}
+ .zebraCell1 {
+ background-color: yellow;
+ }
+
+ .zebraCell2 {
+ background-color: fuchsia;
+ }
+
+ .zebraRow1 * {
+ color: white;
+ }
+
+ .zebraRow2 * {
+ color: navy;
+ }
</style>
<title>Ordering List Demo.</title>
@@ -181,6 +196,24 @@
</h:column>
</ol:orderingList>
</h:panelGroup>
+
+ <h:panelGroup>
+ <ol:orderingList value="#{bean.zebraItems}" var="item"
+ controlsType="link" columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1, zebraRow2">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Name" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </h:column>
+ </ol:orderingList>
+ </h:panelGroup>
</h:panelGrid>
<a4j:commandButton value="Ajax Submit" reRender="orderingList1" />
<h:commandButton value="Add item" action="#{demoBean.addItem}" />
More information about the richfaces-svn-commits
mailing list