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.component.ComponentUtil;
021    import org.apache.myfaces.tobago.component.UITreeOld;
022    import org.apache.myfaces.tobago.TobagoConstants;
023    
024    import javax.faces.component.UIComponent;
025    import javax.faces.component.ActionSource;
026    
027    @Deprecated
028    public class TreeOldTag extends TobagoTag implements TreeOldTagDeclaration {
029    
030      private String value;
031      private String state;
032    
033      private String showJunctions;
034      private String showIcons;
035      private String showRoot;
036      private String showRootJunction;
037    
038      private String selectable;
039      private String mutable;
040    
041      private String idReference;
042      private String nameReference;
043      private String disabledReference;
044      private String tipReference;
045    
046      private String required;
047    
048      private String actionListener;
049    
050      private String mode;
051    
052      public String getComponentType() {
053        return UITreeOld.COMPONENT_TYPE;
054      }
055    
056      protected void setProperties(UIComponent component) {
057        super.setProperties(component);
058    
059        ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_VALUE, value);
060        ComponentUtil.setValueBinding(component, TobagoConstants.ATTR_STATE, state);
061    
062        ComponentUtil.setBooleanProperty(component,
063            TobagoConstants.ATTR_SHOW_JUNCTIONS, showJunctions);
064        ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_SHOW_ICONS, showIcons);
065        ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_SHOW_ROOT, showRoot);
066        ComponentUtil.setBooleanProperty(component,
067            TobagoConstants.ATTR_SHOW_ROOT_JUNCTION, showRootJunction);
068    
069        ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_SELECTABLE, selectable);
070        ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_MUTABLE, mutable);
071    
072        ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_ID_REFERENCE, idReference);
073        ComponentUtil.setStringProperty(component,
074            TobagoConstants.ATTR_NAME_REFERENCE, nameReference);
075        ComponentUtil.setStringProperty(component,
076            TobagoConstants.ATTR_DISABLED_REFERENCE, disabledReference);
077        ComponentUtil.setBooleanProperty(component, TobagoConstants.ATTR_REQUIRED, required);
078        ComponentUtil.setActionListener((ActionSource) component, actionListener);
079        ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_MODE, mode);
080        ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_TIP_REFERENCE, tipReference);
081      }
082    
083      public void release() {
084        super.release();
085        value = null;
086        state = null;
087        showJunctions = null;
088        showIcons = null;
089        showRoot = null;
090        showRootJunction = null;
091        selectable = null;
092        mutable = null;
093        idReference = null;
094        nameReference = null;
095        disabledReference = null;
096        required = null;
097        actionListener = null;
098        mode = null;
099      }
100    
101      public String getValue() {
102        return value;
103      }
104    
105      public void setValue(String value) {
106        this.value = value;
107      }
108    
109      public String getState() {
110        return state;
111      }
112    
113      public void setState(String state) {
114        this.state = state;
115      }
116    
117      public String getShowIcons() {
118        return showIcons;
119      }
120    
121      public void setActionListener(String actionListener) {
122        this.actionListener = actionListener;
123      }
124      public String getActionListener() {
125        return actionListener;
126      }
127    
128      public void setShowIcons(String showIcons) {
129        this.showIcons = showIcons;
130      }
131    
132      public String getShowJunctions() {
133        return showJunctions;
134      }
135    
136      public void setShowJunctions(String showJunctions) {
137        this.showJunctions = showJunctions;
138      }
139    
140      public String getShowRoot() {
141        return showRoot;
142      }
143    
144      public void setShowRoot(String showRoot) {
145        this.showRoot = showRoot;
146      }
147    
148      public String getShowRootJunction() {
149        return showRootJunction;
150      }
151    
152      public void setShowRootJunction(String showRootJunction) {
153        this.showRootJunction = showRootJunction;
154      }
155    
156      public String getIdReference() {
157        return idReference;
158      }
159    
160      public void setIdReference(String idReference) {
161        this.idReference = idReference;
162      }
163    
164      public String getSelectable() {
165        return selectable;
166      }
167    
168      public void setSelectable(String selectable) {
169        this.selectable = selectable;
170      }
171    
172      public String getMutable() {
173        return mutable;
174      }
175    
176      public void setMutable(String mutable) {
177        this.mutable = mutable;
178      }
179    
180      public String getNameReference() {
181        return nameReference;
182      }
183    
184      public void setNameReference(String nameReference) {
185        this.nameReference = nameReference;
186      }
187    
188      public String getDisabledReference() {
189        return disabledReference;
190      }
191    
192      public void setDisabledReference(String disabledReference) {
193        this.disabledReference = disabledReference;
194      }
195    
196      public String getRequired() {
197        return required;
198      }
199    
200      public void setRequired(String required) {
201        this.required = required;
202      }
203    
204      public String getMode() {
205        return mode;
206      }
207    
208      public void setMode(String mode) {
209        this.mode = mode;
210      }
211    
212      public void setTipReference(String tipReference) {
213        this.tipReference = tipReference;
214      }
215    }