Author: konstantin.mishin
Date: 2007-11-09 13:33:48 -0500 (Fri, 09 Nov 2007)
New Revision: 3881
Added:
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/META-INF/
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/META-INF/MANIFEST.MF
Modified:
trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
Log:
RF-1305
Modified: trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java 2007-11-09
18:29:45 UTC (rev 3880)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java 2007-11-09
18:33:48 UTC (rev 3881)
@@ -20,10 +20,56 @@
*/
package org.richfaces;
+
+import java.util.ArrayList;
+import java.util.List;
+
/**
- * @author $Autor$
- *
+ * @author k
+ *
*/
public class Bean {
-
+ public class Pair {
+
+ private String first = "first";
+ private String second = "second";
+
+ public Pair(int i) {
+ first = i + " first";
+ second = i + " second";
+ }
+
+ public void setFirst(String first) {
+ this.first = first;
+ }
+
+ public String getFirst() {
+ return first;
+ }
+
+ public void setSecond(String second) {
+ this.second = second;
+ }
+
+ public String getSecond() {
+ return second;
+ }
+ }
+
+ private List<Pair> model = new ArrayList<Pair>();
+
+ public Bean() {
+ for (int i = 0; i < 1000; i++) {
+ model.add(new Pair(i));
+ }
+ }
+
+ public List<Pair> getModel() {
+ return model;
+ }
+
+ public void setModel(List<Pair> model) {
+ this.model = model;
+ }
+
}
\ No newline at end of file
Added: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/META-INF/MANIFEST.MF 2007-11-09
18:33:48 UTC (rev 3881)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Modified: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2007-11-09
18:29:45 UTC (rev 3880)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2007-11-09
18:33:48 UTC (rev 3881)
@@ -1,12 +1,47 @@
<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
<head>
- <title></title>
+ <title>
+ </title>
+ <style>
+ <!--
+.header {
+ background-color: graytext;
+}
+.footer {
+ background-color: gray;
+}
+ -->
+ </style>
</head>
<body>
<f:view>
-
+ <h:form>
+ <h:dataTable id="table" value="#{bean.model}"
var="row" style="width:300px"
+ first="0" rows="40" width="100%">
+ <h:column headerClass="header" footerClass="footer">
+ <f:facet name="header">
+ <h:outputText value="First header"></h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="First footer"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row.first}"></h:outputText>
+ </h:column>
+ <h:column headerClass="header" footerClass="footer">
+ <f:facet name="header">
+ <h:outputText value="Second header"></h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="Second footer"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row.second}"></h:outputText>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+
</f:view>
</body>
</html>