|
JSF Application |
|
// Stores song detail
HashMap detail;
String selectedSong;
String songDetail = “Select a song to view
information”;
private String category;
private List categories;
private UIInput subCategoryList;
private String subCategory;
private List subCategories;
private HtmlOutputText showAllSelected;
public Bean(){
songList = new ArrayList();
//Add song titles to songList ArrayList.
songList.add(new SelectItem(“songSelect”,
“—Select One—”, “s”));
songList.add(new SelectItem(“song1”,
“Song One”, “s1”));
songList.add(new SelectItem(“song2”,
“Song Two”, “s2”));
songList.add(new SelectItem(“song3”,
“Song Three”, “s3”));
detail = new HashMap();
//Put song details in detail HashMap
detail.put(“songSelect”, “Select a song to
view information”);
detail.put(“song1”, “Album1, Singer1,
Duration: 7.13”);
detail.put(“song2”, “Album2, Singer2,
Duration: 5.20”);
detail.put(“song3”, “Album3, Singer3,
Duration: 6.35”);
categories = new ArrayList();
//Add sets to categories ArrayList.
categories.add(new SelectItem(“ch1”, “Set
A”));
categories.add(new SelectItem(“ch2”, “Set
B”));
}
public String getSelectedSong () {
return selectedSong;
}
public void setSelectedSong (String
selectedSong) {
this.selectedSong = selectedSong;
}
public ArrayList getSongList() { |
|
return songList;
}
public void setSongList(ArrayList songList)
{
this.songList = songList;
}
public String getSongDetail() {
return songDetail;
}
public void setSongDetail(String
songDetail){
this.songDetail = songDetail;
}
public String getCategory(){
return category;
}
public void setCategory(String category){
this.category = category;
}
public String getSubCategory(){
return subCategory;
}
public void setSubCategory(String
subCategory){
this.subCategory = subCategory;
}
public void setCategories(List opt){
categories = opt;
}
public List getCategories(){
return categories;
}
public void setSubCategories(List opt){
subCategories = opt;
}
public List getSubCategories(){
return subCategories;
}
public void setSubCategoryList(UIInput
aSubCategoryList) {
this.subCategoryList = aSubCategoryList;
}
public UIInput getSubCategoryList() {
return subCategoryList;
}
public void
setShowAllSelected(HtmlOutputText
showAllSelected) {
this.showAllSelected = showAllSelected;
}
public HtmlOutputText getShowAllSelected()
|
|
Feb
2008 | Java Jazz Up | 56 |
|
|
View All Topics |
All Pages of this Issue |
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53 ,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63 ,
64,
65 ,
66 ,
67 ,
68 ,
69 ,
70 ,
71 ,
72 ,
Download PDF |
|
|
|
|
|
|
|
|
|