001 package org.apache.myfaces.tobago.taglib.component;
002
003 /*
004 * Licensed to the Apache Software Foundation (ASF) under one or more
005 * contributor license agreements. See the NOTICE file distributed with
006 * this work for additional information regarding copyright ownership.
007 * The ASF licenses this file to You under the Apache License, Version 2.0
008 * (the "License"); you may not use this file except in compliance with
009 * the License. You may obtain a copy of the License at
010 *
011 * http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019
020 import org.apache.myfaces.tobago.TobagoConstants;
021 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TAB_INDEX;
022 import org.apache.myfaces.tobago.component.ComponentUtil;
023 import org.apache.myfaces.tobago.component.UITreeOld;
024
025 import javax.faces.component.ActionSource;
026 import javax.faces.component.UIComponent;
027
028 @Deprecated
029 public class TreeOldTag extends TobagoTag implements TreeOldTagDeclaration {
030
031 private String value;
032 private String state;
033
034 private String showJunctions;
035 private String showIcons;
036 private String showRoot;
037 private String showRootJunction;
038
039 private String selectable;
040 private String mutable;
041
042 private String idReference;
043 private String nameReference;
044 private String disabledReference;
045 private String tipReference;
046
047 private String required;
048
049 private String actionListener;
050
051 private String mode;
052
053 private String tabIndex;
054
055 public String getComponentType() {
056 return UITreeOld.COMPONENT_TYPE;
057 }
058
059 protected void setProperties(UIComponent component) {
060 super.setProperties(component);
061
062 ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_VALUE, value);
063 ComponentUtil.setValueBinding(component, TobagoConstants.ATTR_STATE, state);
064
065 ComponentUtil.setBooleanProperty(component,
066 TobagoConstants.ATTR_SHOW_JUNCTIONS, showJunctions);
067 ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_SHOW_ICONS, showIcons);
068 ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_SHOW_ROOT, showRoot);
069 ComponentUtil.setBooleanProperty(component,
070 TobagoConstants.ATTR_SHOW_ROOT_JUNCTION, showRootJunction);
071
072 ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_SELECTABLE, selectable);
073 ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_MUTABLE, mutable);
074
075 ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_ID_REFERENCE, idReference);
076 ComponentUtil.setStringProperty(component,
077 TobagoConstants.ATTR_NAME_REFERENCE, nameReference);
078 ComponentUtil.setStringProperty(component,
079 TobagoConstants.ATTR_DISABLED_REFERENCE, disabledReference);
080 ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_REQUIRED, required);
081 ComponentUtil.setActionListener((ActionSource) component, actionListener);
082 ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_MODE, mode);
083 ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_TIP_REFERENCE, tipReference);
084 ComponentUtil.setIntegerProperty(component, ATTR_TAB_INDEX, tabIndex);
085 }
086
087 public void release() {
088 super.release();
089 value = null;
090 state = null;
091 showJunctions = null;
092 showIcons = null;
093 showRoot = null;
094 showRootJunction = null;
095 selectable = null;
096 mutable = null;
097 idReference = null;
098 nameReference = null;
099 disabledReference = null;
100 required = null;
101 actionListener = null;
102 mode = null;
103 tabIndex = null;
104 }
105
106 public String getValue() {
107 return value;
108 }
109
110 public void setValue(String value) {
111 this.value = value;
112 }
113
114 public String getState() {
115 return state;
116 }
117
118 public void setState(String state) {
119 this.state = state;
120 }
121
122 public String getShowIcons() {
123 return showIcons;
124 }
125
126 public void setActionListener(String actionListener) {
127 this.actionListener = actionListener;
128 }
129
130 public String getActionListener() {
131 return actionListener;
132 }
133
134 public void setShowIcons(String showIcons) {
135 this.showIcons = showIcons;
136 }
137
138 public String getShowJunctions() {
139 return showJunctions;
140 }
141
142 public void setShowJunctions(String showJunctions) {
143 this.showJunctions = showJunctions;
144 }
145
146 public String getShowRoot() {
147 return showRoot;
148 }
149
150 public void setShowRoot(String showRoot) {
151 this.showRoot = showRoot;
152 }
153
154 public String getShowRootJunction() {
155 return showRootJunction;
156 }
157
158 public void setShowRootJunction(String showRootJunction) {
159 this.showRootJunction = showRootJunction;
160 }
161
162 public String getIdReference() {
163 return idReference;
164 }
165
166 public void setIdReference(String idReference) {
167 this.idReference = idReference;
168 }
169
170 public String getSelectable() {
171 return selectable;
172 }
173
174 public void setSelectable(String selectable) {
175 this.selectable = selectable;
176 }
177
178 public String getMutable() {
179 return mutable;
180 }
181
182 public void setMutable(String mutable) {
183 this.mutable = mutable;
184 }
185
186 public String getNameReference() {
187 return nameReference;
188 }
189
190 public void setNameReference(String nameReference) {
191 this.nameReference = nameReference;
192 }
193
194 public String getDisabledReference() {
195 return disabledReference;
196 }
197
198 public void setDisabledReference(String disabledReference) {
199 this.disabledReference = disabledReference;
200 }
201
202 public String getRequired() {
203 return required;
204 }
205
206 public void setRequired(String required) {
207 this.required = required;
208 }
209
210 public String getMode() {
211 return mode;
212 }
213
214 public void setMode(String mode) {
215 this.mode = mode;
216 }
217
218 public void setTipReference(String tipReference) {
219 this.tipReference = tipReference;
220 }
221
222 public String getTabIndex() {
223 return tabIndex;
224 }
225
226 public void setTabIndex(String tabIndex) {
227 this.tabIndex = tabIndex;
228 }
229 }