Author: jharting
Date: 2009-08-12 08:04:06 -0400 (Wed, 12 Aug 2009)
New Revision: 11367
Added:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/
Removed:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/ExcelTest.java
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/test/
Modified:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/RenderTest.java
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/testng.xml
Log:
JBSEAM-4352
Copied:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java
(from rev 11360,
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/ExcelTest.java)
===================================================================
---
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java
(rev 0)
+++
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java 2009-08-12
12:04:06 UTC (rev 11367)
@@ -0,0 +1,120 @@
+package org.jboss.seam.example.excel;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("excelTest")
+(a)Scope(ScopeType.SESSION)
+public class ExcelTest
+{
+
+ private List<Person> people = new LinkedList<Person>();
+ private List<Person> result = new LinkedList<Person>();
+ private List<List<Person>> repeat = new
LinkedList<List<Person>>();
+ private String searchWord;
+
+
+ @Create
+ public void create()
+ {
+ people.add(new Person("Pete Muir", "Red Hat Inc.",
"Project Lead"));
+ people.add(new Person("Gavin King", "Red Hat Inc.",
"Project Founder"));
+ people.add(new Person("Norman Richards", "Red Hat Inc.",
"Seam Core"));
+ people.add(new Person("Shane Bryzak", "Red Hat Inc.",
"Seam Security, Seam Remoting"));
+ people.add(new Person("Michael Yuan", "Individual",
""));
+ people.add(new Person("Mike Youngstrom", "Individual",
"Spring Integration"));
+ people.add(new Person("Ales Justin", "Red Hat Inc.",
"JBoss5/MC Integration"));
+ people.add(new Person("Christian Bauer", "Red Hat Inc.",
"Seam Wiki, REST and GWT integration"));
+ people.add(new Person("Jay Balunas", "Red Hat Inc.",
"Cross-platform testing"));
+ people.add(new Person("Dan Allen", "Individual",
"Seam-gen, Bug fixes"));
+ people.add(new Person("Matt Drees", "Individual", "Seam
Core"));
+ people.add(new Person("Jacob Orshalick", "Focus IT Solutions
LLC", ""));
+ people.add(new Person("Nicklas Karlsson", "Individual",
"Excel reporting"));
+ people.add(new Person("Daniel Roth", "Individual", "Excel
reporting"));
+ people.add(new Person("Judy Guglielmin", "ICESoft Inc.",
"ICEFaces integration"));
+ people.add(new Person("Max Rydahl Andersen", "Red Hat Inc.",
"Lead developer JBoss Tools, Hibernate Tools, Seam Tools"));
+ people.add(new Person("Emmanuel Bernard", "Red Hat Inc.",
"Lead developer Hibernate Annotations, EntityManager, Validator, Search"));
+ repeat.add(people.subList(0, 5));
+ }
+
+ public List<List<Person>> getRepeat()
+ {
+ return repeat;
+ }
+
+ public void setRepeat(List<List<Person>> repeat)
+ {
+ this.repeat = repeat;
+ }
+
+ public void setSearchWord(String searchWord)
+ {
+ this.searchWord = searchWord;
+ }
+
+ public String getSearchWord()
+ {
+ return searchWord;
+ }
+
+ public List<Person> getPeople()
+ {
+ return people;
+ }
+
+ public List<Person> getResult()
+ {
+ return result;
+ }
+
+ public void search()
+ {
+ result = new LinkedList<Person>();
+ for (Person person : people)
+ {
+ if (person.getName().toLowerCase().contains(searchWord.toLowerCase()))
+ result.add(person);
+ }
+ }
+
+ public void clear()
+ {
+ this.result = new LinkedList<Person>();
+ }
+
+ public class Person
+ {
+ String name;
+ String company;
+ String task;
+
+ public Person(String name, String company, String task)
+ {
+ this.company = company;
+ this.name = name;
+ this.task = task;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getTask()
+ {
+ return task;
+ }
+
+ public String getCompany()
+ {
+ return company;
+ }
+
+ }
+
+}
Copied: branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test
(from rev 11360,
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/test)
Modified:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/RenderTest.java
===================================================================
---
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/test/RenderTest.java 2009-08-10
23:27:39 UTC (rev 11360)
+++
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/RenderTest.java 2009-08-12
12:04:06 UTC (rev 11367)
@@ -1,16 +1,13 @@
-package org.jboss.seam.excel.test;
+package org.jboss.seam.example.excel.test;
import java.io.ByteArrayInputStream;
-import java.util.List;
-import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.document.ByteArrayDocumentData;
import org.jboss.seam.document.DocumentData;
-import org.jboss.seam.excel.ExcelTest.Person;
import org.jboss.seam.faces.Renderer;
import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.Test;
Modified:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/testng.xml
===================================================================
---
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/test/testng.xml 2009-08-10
23:27:39 UTC (rev 11360)
+++
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/example/excel/test/testng.xml 2009-08-12
12:04:06 UTC (rev 11367)
@@ -4,7 +4,7 @@
<test name="Excel Tests">
<classes>
- <class name="org.jboss.seam.excel.test.RenderTest"/>
+ <class name="org.jboss.seam.example.excel.test.RenderTest"/>
</classes>
</test>
Deleted:
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/ExcelTest.java
===================================================================
---
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/ExcelTest.java 2009-08-12
11:19:37 UTC (rev 11366)
+++
branches/community/Seam_2_2/examples/excel/src/org/jboss/seam/excel/ExcelTest.java 2009-08-12
12:04:06 UTC (rev 11367)
@@ -1,122 +0,0 @@
-package org.jboss.seam.excel;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
-@Name("excelTest")
-(a)Scope(ScopeType.SESSION)
-public class ExcelTest
-{
-
- private List<Person> people = new LinkedList<Person>();
- private List<Person> result = new LinkedList<Person>();
- private List<List<Person>> repeat = new
LinkedList<List<Person>>();
- private String searchWord;
-
-
- @Create
- public void create()
- {
- people.add(new Person("Pete Muir", "Red Hat Inc.",
"Project Lead"));
- people.add(new Person("Gavin King", "Red Hat Inc.",
"Project Founder"));
- people.add(new Person("Norman Richards", "Red Hat Inc.",
"Seam Core"));
- people.add(new Person("Shane Bryzak", "Red Hat Inc.",
"Seam Security, Seam Remoting"));
- people.add(new Person("Michael Yuan", "Individual",
""));
- people.add(new Person("Mike Youngstrom", "Individual",
"Spring Integration"));
- people.add(new Person("Ales Justin", "Red Hat Inc.",
"JBoss5/MC Integration"));
- people.add(new Person("Christian Bauer", "Red Hat Inc.",
"Seam Wiki, REST and GWT integration"));
- people.add(new Person("Jay Balunas", "Red Hat Inc.",
"Cross-platform testing"));
- people.add(new Person("Dan Allen", "Individual",
"Seam-gen, Bug fixes"));
- people.add(new Person("Matt Drees", "Individual", "Seam
Core"));
- people.add(new Person("Jacob Orshalick", "Focus IT Solutions
LLC", ""));
- people.add(new Person("Nicklas Karlsson", "Individual",
"Excel reporting"));
- people.add(new Person("Daniel Roth", "Individual", "Excel
reporting"));
- people.add(new Person("Judy Guglielmin", "ICESoft Inc.",
"ICEFaces integration"));
- people.add(new Person("Max Rydahl Andersen", "Red Hat Inc.",
"Lead developer JBoss Tools, Hibernate Tools, Seam Tools"));
- people.add(new Person("Emmanuel Bernard", "Red Hat Inc.",
"Lead developer Hibernate Annotations, EntityManager, Validator, Search"));
- repeat.add(people.subList(0, 5));
- }
-
- public List<List<Person>> getRepeat()
- {
- return repeat;
- }
-
- public void setRepeat(List<List<Person>> repeat)
- {
- this.repeat = repeat;
- }
-
- public void setSearchWord(String searchWord)
- {
- this.searchWord = searchWord;
- }
-
- public String getSearchWord()
- {
- return searchWord;
- }
-
- public List<Person> getPeople()
- {
- return people;
- }
-
- public List<Person> getResult()
- {
- return result;
- }
-
- public void search()
- {
- result = new LinkedList<Person>();
- for (Person person : people)
- {
- if (person.getName().toLowerCase().contains(searchWord.toLowerCase()))
- result.add(person);
- }
- }
-
- public void clear()
- {
- this.result = new LinkedList<Person>();
- }
-
- public class Person
- {
- String name;
- String company;
- String task;
-
- public Person(String name, String company, String task)
- {
- this.company = company;
- this.name = name;
- this.task = task;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getTask()
- {
- return task;
- }
-
- public String getCompany()
- {
- return company;
- }
-
- }
-
-}