HTML and CSS Reference
In-Depth Information
public void setActiveCountry(Country activeCountry) {
this.activeCountry = activeCountry;
}
}
Country managed bean holds name , population , and cities of Country class as shown in Listing 9-4.
Listing 9-4. Country Managed Bean
public class Country {
private String name;
private long population;
private List<City> cities;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getPopulation() {
return population;
}
public void setPopulation(long population) {
this.population = population;
}
public List<City> getCities() {
return cities;
}
public void setCities(List<City> cities) {
this.cities = cities;
}
}
City managed bean holds name and population of City class as shown in Listing 9-5.
Listing 9-5. City Managed Bean
public class City {
private String name;
private long population;
public String getName() {
return name;
}
 
Search WWH ::




Custom Search