Author: nbelaevski
Date: 2008-12-10 13:41:53 -0500 (Wed, 10 Dec 2008)
New Revision: 11710
Added:
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
Log:
Example for RF-2644 committed
Added:
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
===================================================================
---
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
(rev 0)
+++
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java 2008-12-10
18:41:53 UTC (rev 11710)
@@ -0,0 +1,54 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+
+@Stateful
+@Name("rf2644")
+(a)Scope(ScopeType.SESSION)
+public class DataBean implements DataBeanLocal {
+
+ @DataModel
+ private List<Item> items = new ArrayList<Item>();
+
+ @DataModelSelection
+ private Item item;
+
+ public DataBean() {
+ super();
+ }
+
+ @Factory("rf2644Items")
+ public void createList() {
+ for (int i = 0; i < 5000; i++) {
+ Item item = new Item();
+ item.setName(UUID.randomUUID().toString());
+
+ items.add(item);
+ }
+ }
+
+ public Item getItem() {
+ return item;
+ }
+
+ public void setItem(Item item) {
+ this.item = item;
+ }
+
+ @Remove
+ public void destroy() {
+
+ }
+}
Added:
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
===================================================================
---
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
(rev 0)
+++
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java 2008-12-10
18:41:53 UTC (rev 11710)
@@ -0,0 +1,13 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+import javax.ejb.Local;
+
+@Local
+public interface DataBeanLocal {
+
+ public void createList();
+
+ public void setItem(Item item);
+ public Item getItem();
+
+}
Added:
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
===================================================================
---
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
(rev 0)
+++
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java 2008-12-10
18:41:53 UTC (rev 11710)
@@ -0,0 +1,17 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+public class Item {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void action() {
+ System.out.println("Item.action() " + name);
+ }
+}
Added:
trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
===================================================================
---
trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
(rev 0)
+++
trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml 2008-12-10
18:41:53 UTC (rev 11710)
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+ <rich:scrollableDataTable id="table" value="#{rf2644Items}"
var="item" rows="100">
+ <rich:column width="400">
+ <s:link value="#{item.name}" action="#{item.action}" />
+ </rich:column>
+ </rich:scrollableDataTable>
+
+ <h:dataTable value="#{rf2644Items}" var="item"
rows="100">
+ <rich:column width="400">
+ <s:link value="#{item.name}" action="#{item.action}" />
+ </rich:column>
+ </h:dataTable>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file