Author: konstantin.mishin
Date: 2007-11-09 13:50:46 -0500 (Fri, 09 Nov 2007)
New Revision: 3883
Modified:
trunk/sandbox/samples/contextMenuDemo/pom.xml
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/pom.xml
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/pom.xml 2007-11-09 18:48:52 UTC (rev 3882)
+++ trunk/sandbox/samples/contextMenuDemo/pom.xml 2007-11-09 18:50:46 UTC (rev 3883)
@@ -21,6 +21,11 @@
<artifactId>core</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>dataTable</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
<finalName>contextMenuDemo</finalName>
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:48:52 UTC (rev 3882)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/java/org/richfaces/Bean.java 2007-11-09
18:50:46 UTC (rev 3883)
@@ -31,12 +31,14 @@
public class Bean {
public class Pair {
- private String first = "first";
- private String second = "second";
+ private String first;
+ private String second;
public Pair(int i) {
- first = i + " first";
- second = i + " second";
+ if(Package.getPackages().length > i) {
+ first = Package.getPackages()[i].getName();
+ second = Package.getPackages()[i].getImplementationTitle();
+ }
}
public void setFirst(String first) {
@@ -59,7 +61,7 @@
private List<Pair> model = new ArrayList<Pair>();
public Bean() {
- for (int i = 0; i < 1000; i++) {
+ for (int i = 0; i < 100; i++) {
model.add(new Pair(i));
}
}
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:48:52 UTC (rev 3882)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2007-11-09
18:50:46 UTC (rev 3883)
@@ -1,6 +1,6 @@
<%@ 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"%>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/dataTable"
prefix="dt"%>
<html>
<head>
<title>
@@ -19,9 +19,9 @@
<body>
<f:view>
<h:form>
- <h:dataTable id="table" value="#{bean.model}"
var="row" style="width:300px"
+ <dt:dataTable id="table" value="#{bean.model}"
var="row" style="width:300px"
first="0" rows="40" width="100%">
- <h:column headerClass="header" footerClass="footer">
+ <dt:column headerClass="header" footerClass="footer">
<f:facet name="header">
<h:outputText value="First header"></h:outputText>
</f:facet>
@@ -29,8 +29,8 @@
<h:outputText value="First footer"></h:outputText>
</f:facet>
<h:outputText value="#{row.first}"></h:outputText>
- </h:column>
- <h:column headerClass="header" footerClass="footer">
+ </dt:column>
+ <dt:column headerClass="header" footerClass="footer">
<f:facet name="header">
<h:outputText value="Second header"></h:outputText>
</f:facet>
@@ -38,8 +38,8 @@
<h:outputText value="Second footer"></h:outputText>
</f:facet>
<h:outputText value="#{row.second}"></h:outputText>
- </h:column>
- </h:dataTable>
+ </dt:column>
+ </dt:dataTable>
</h:form>
</f:view>