[seam-commits] Seam SVN: r11365 - in branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam: example and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Aug 12 07:16:31 EDT 2009
Author: jharting
Date: 2009-08-12 07:16:31 -0400 (Wed, 12 Aug 2009)
New Revision: 11365
Added:
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/
Removed:
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/ExcelTest.java
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/test/
Modified:
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/RenderTest.java
branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/testng.xml
Log:
JBPAPP-2462
Copied: branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java (from rev 11364, branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/ExcelTest.java)
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java (rev 0)
+++ branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/ExcelTest.java 2009-08-12 11:16:31 UTC (rev 11365)
@@ -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;
+
+ at Name("excelTest")
+ at 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/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test (from rev 11364, branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/test)
Modified: branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/RenderTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/test/RenderTest.java 2009-08-11 21:06:42 UTC (rev 11364)
+++ branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/RenderTest.java 2009-08-12 11:16:31 UTC (rev 11365)
@@ -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/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/testng.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/test/testng.xml 2009-08-11 21:06:42 UTC (rev 11364)
+++ branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/example/excel/test/testng.xml 2009-08-12 11:16:31 UTC (rev 11365)
@@ -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/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/ExcelTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/ExcelTest.java 2009-08-11 21:06:42 UTC (rev 11364)
+++ branches/enterprise/JBPAPP_5_0/examples/excel/src/org/jboss/seam/excel/ExcelTest.java 2009-08-12 11:16:31 UTC (rev 11365)
@@ -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;
-
- at Name("excelTest")
- at 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;
- }
-
- }
-
-}
More information about the seam-commits
mailing list