1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.taglib.core; |
17 | |
|
18 | |
import javax.faces.component.UIComponent; |
19 | |
import javax.faces.component.UISelectItem; |
20 | |
|
21 | |
import org.seasar.teeda.core.JsfConstants; |
22 | |
import org.seasar.teeda.core.taglib.UIComponentTagBase; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class SelectItemTag extends UIComponentTagBase { |
28 | |
|
29 | |
private static final String COMPONENT_TYPE = UISelectItem.COMPONENT_TYPE; |
30 | |
|
31 | |
protected String itemDescription; |
32 | |
|
33 | |
protected String itemDisabled; |
34 | |
|
35 | |
protected String itemLabel; |
36 | |
|
37 | |
protected String itemValue; |
38 | |
|
39 | |
public SelectItemTag() { |
40 | 4 | super(); |
41 | 4 | } |
42 | |
|
43 | |
public void setItemDescription(String itemDescription) { |
44 | 2 | this.itemDescription = itemDescription; |
45 | 2 | } |
46 | |
|
47 | |
public void setItemDisabled(String itemDisabled) { |
48 | 2 | this.itemDisabled = itemDisabled; |
49 | 2 | } |
50 | |
|
51 | |
public void setItemLabel(String itemLabel) { |
52 | 2 | this.itemLabel = itemLabel; |
53 | 2 | } |
54 | |
|
55 | |
public void setItemValue(String itemValue) { |
56 | 2 | this.itemValue = itemValue; |
57 | 2 | } |
58 | |
|
59 | |
public String getItemDescription() { |
60 | 1 | return itemDescription; |
61 | |
} |
62 | |
|
63 | |
public String getItemDisabled() { |
64 | 1 | return itemDisabled; |
65 | |
} |
66 | |
|
67 | |
public String getItemLabel() { |
68 | 1 | return itemLabel; |
69 | |
} |
70 | |
|
71 | |
public String getItemValue() { |
72 | 1 | return itemValue; |
73 | |
} |
74 | |
|
75 | |
public String getComponentType() { |
76 | 1 | return COMPONENT_TYPE; |
77 | |
} |
78 | |
|
79 | |
public String getRendererType() { |
80 | 2 | return null; |
81 | |
} |
82 | |
|
83 | |
protected void setProperties(UIComponent component) { |
84 | 1 | super.setProperties(component); |
85 | 1 | setComponentProperty(component, JsfConstants.ITEM_DESCRIPTION_ATTR, |
86 | |
itemDescription); |
87 | 1 | setComponentProperty(component, JsfConstants.ITEM_DISABLED_ATTR, |
88 | |
itemDisabled); |
89 | 1 | setComponentProperty(component, JsfConstants.ITEM_LABEL_ATTR, itemLabel); |
90 | 1 | setComponentProperty(component, JsfConstants.ITEM_VALUE_ATTR, itemValue); |
91 | 1 | } |
92 | |
|
93 | |
public void release() { |
94 | 1 | super.release(); |
95 | 1 | itemDescription = null; |
96 | 1 | itemDisabled = null; |
97 | 1 | itemLabel = null; |
98 | 1 | itemValue = null; |
99 | 1 | } |
100 | |
|
101 | |
} |