1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.component;
21
22 import javax.el.MethodExpression;
23 import javax.faces.context.FacesContext;
24 import org.apache.myfaces.tobago.context.Markup;
25 import org.apache.myfaces.tobago.internal.component.AbstractUITabGroup;
26 import org.apache.myfaces.tobago.model.SwitchType;
27 import org.apache.myfaces.tobago.renderkit.css.CustomClass;
28 import org.apache.myfaces.tobago.internal.util.ArrayUtils;
29 import org.apache.myfaces.tobago.internal.util.StringUtils;
30 import org.apache.myfaces.tobago.internal.util.Deprecation;
31 import org.apache.myfaces.tobago.component.Tags;
32 import javax.annotation.Generated;
33 import javax.el.ELException;
34 import javax.faces.FacesException;
35 import java.util.Arrays;
36 import java.util.ArrayList;
37 import java.util.Collection;
38 import java.util.List;
39 import javax.el.MethodExpression;
40 import javax.el.ValueExpression;
41
42
43
44
45
46
47 @Generated("component.stg")
48 public class UITabGroup
49 extends AbstractUITabGroup {
50
51 public static final String COMPONENT_TYPE = Tags.tabGroup.componentType();
52
53 public static final String COMPONENT_FAMILY = "javax.faces.Panel";
54
55 private static final Collection<String> EVENT_NAMES = Arrays.asList("click");
56
57 @Override
58 public Collection<String> getEventNames() {
59 return EVENT_NAMES;
60 }
61
62 @Override
63 public String getDefaultEventName() {
64 return "click";
65 }
66
67
68 enum PropertyKeys {
69 renderedIndex,
70 actionListener,
71 switchType,
72 tabChangeListener,
73 markup,
74 immediate,
75 action,
76 customClass,
77 showNavigationBar,
78 tip,
79 selectedIndex,
80 }
81
82 public String getFamily() {
83 return COMPONENT_FAMILY;
84 }
85
86
87
88
89
90
91 public java.lang.Integer getRenderedIndex() {
92 Number value = (Number) getStateHelper().eval(PropertyKeys.renderedIndex);
93 if (value != null) {
94 return value.intValue();
95 }
96 return 0;
97 }
98
99 public void setRenderedIndex(java.lang.Integer renderedIndex) {
100 getStateHelper().put(PropertyKeys.renderedIndex, renderedIndex);
101 }
102
103 public javax.el.MethodExpression getActionListenerExpression() {
104 return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.actionListener);
105 }
106
107 public void setActionListenerExpression(javax.el.MethodExpression actionListener) {
108 getStateHelper().put(PropertyKeys.actionListener, actionListener);
109 }
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 public org.apache.myfaces.tobago.model.SwitchType getSwitchType() {
130 org.apache.myfaces.tobago.model.SwitchType switchType = (org.apache.myfaces.tobago.model.SwitchType) getStateHelper().eval(PropertyKeys.switchType);
131 if (switchType != null) {
132 return switchType;
133 }
134 return org.apache.myfaces.tobago.model.SwitchType.client;
135 }
136
137 public void setSwitchType(org.apache.myfaces.tobago.model.SwitchType switchType) {
138 getStateHelper().put(PropertyKeys.switchType, switchType);
139 }
140
141 public javax.el.MethodExpression getTabChangeListenerExpression() {
142 return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.tabChangeListener);
143 }
144
145 public void setTabChangeListenerExpression(javax.el.MethodExpression tabChangeListener) {
146 getStateHelper().put(PropertyKeys.tabChangeListener, tabChangeListener);
147 }
148
149
150 public org.apache.myfaces.tobago.context.Markup getMarkup() {
151 Object object = getStateHelper().eval(PropertyKeys.markup);
152 if (object != null) {
153 return Markup.valueOf(object);
154 }
155 return null;
156 }
157
158 public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
159 getStateHelper().put(PropertyKeys.markup, markup);
160 }
161
162
163
164
165
166
167
168
169 public boolean isImmediate() {
170 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.immediate);
171 if (bool != null) {
172 return bool;
173 }
174 return false;
175 }
176
177 public void setImmediate(boolean immediate) {
178 getStateHelper().put(PropertyKeys.immediate, immediate);
179 }
180
181 public javax.el.MethodExpression getActionExpression() {
182 return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.action);
183 }
184
185 public void setActionExpression(javax.el.MethodExpression action) {
186 getStateHelper().put(PropertyKeys.action, action);
187 }
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207 public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
208 return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
209 }
210
211 public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
212 getStateHelper().put(PropertyKeys.customClass, customClass);
213 }
214
215
216
217
218
219 public boolean isShowNavigationBar() {
220 Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showNavigationBar);
221 if (bool != null) {
222 return bool;
223 }
224 return true;
225 }
226
227 public void setShowNavigationBar(boolean showNavigationBar) {
228 getStateHelper().put(PropertyKeys.showNavigationBar, showNavigationBar);
229 }
230
231
232
233
234
235 public java.lang.String getTip() {
236 return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
237 }
238
239 public void setTip(java.lang.String tip) {
240 getStateHelper().put(PropertyKeys.tip, tip);
241 }
242
243
244
245
246
247
248 public java.lang.Integer getSelectedIndex() {
249 Number value = (Number) getStateHelper().eval(PropertyKeys.selectedIndex);
250 if (value != null) {
251 return value.intValue();
252 }
253 return 0;
254 }
255
256 public void setSelectedIndex(java.lang.Integer selectedIndex) {
257 getStateHelper().put(PropertyKeys.selectedIndex, selectedIndex);
258 }
259
260
261 @Override
262 public void restoreState(FacesContext context, Object state) {
263
264 pushComponentToEL(context, this);
265 super.restoreState(context, state);
266 popComponentFromEL(context);
267 }
268
269 }