Author: abelevich
Date: 2010-03-26 12:49:59 -0400 (Fri, 26 Mar 2010)
New Revision: 16675
Modified:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java
Log:
Modified:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java
===================================================================
---
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java 2010-03-26
14:37:17 UTC (rev 16674)
+++
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java 2010-03-26
16:49:59 UTC (rev 16675)
@@ -1,6 +1,7 @@
package org.richfaces.demo.utils;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import org.richfaces.demo.model.Company;
@@ -1345,20 +1346,33 @@
addEmployeeToCollection(employeeList, "Derrik Khoo Sin Huat",
"CTO", "aksinhuat(a)aes.com", "The AES Corporation",
"864-233-4064", "Sydney, Australia");
addEmployeeToCollection(employeeList, "Rick Kelsven", "Network
Analyst", "rkelsven(a)rudny.com", "Rudny's Inc",
"208-356-4991", "Bangkok, Thailand");
-
-
return employeeList;
}
private static void addEmployeeToCollection(List<Employee> collection, String
employeeName, String employeeTitle,
String employeeEmail, String companyName,
String companyPhone,
String companyState) {
- Company company = new Company(companyName);
- company.setPhone(companyPhone);
- company.setState(companyState);
+ Company company1 = new Company(companyName);
+ company1.setPhone(companyPhone);
+ company1.setState(companyState);
+
+ Company company2 = new Company("stubName1");
+ company2.setPhone("stubPhone1");
+ company2.setState("stubState1");
+
+ Company company3 = new Company("stubName2");
+ company3.setPhone("stubPhone2");
+ company3.setState("stubState2");
+
+ List<Company> companies = new ArrayList<Company>();
+ companies.add(company1);
+ companies.add(company2);
+ companies.add(company3);
+
Employee employee = new Employee(employeeName, employeeTitle);
employee.setEMail(employeeEmail);
- employee.setCompany(company);
+ employee.setCompanies(companies);
collection.add(employee);
}
+
}
Show replies by date