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 public String getActionListener() { 130 return actionListener; 131 } 132 133 public void setShowIcons(String showIcons) { 134 this.showIcons = showIcons; 135 } 136 137 public String getShowJunctions() { 138 return showJunctions; 139 } 140 141 public void setShowJunctions(String showJunctions) { 142 this.showJunctions = showJunctions; 143 } 144 145 public String getShowRoot() { 146 return showRoot; 147 } 148 149 public void setShowRoot(String showRoot) { 150 this.showRoot = showRoot; 151 } 152 153 public String getShowRootJunction() { 154 return showRootJunction; 155 } 156 157 public void setShowRootJunction(String showRootJunction) { 158 this.showRootJunction = showRootJunction; 159 } 160 161 public String getIdReference() { 162 return idReference; 163 } 164 165 public void setIdReference(String idReference) { 166 this.idReference = idReference; 167 } 168 169 public String getSelectable() { 170 return selectable; 171 } 172 173 public void setSelectable(String selectable) { 174 this.selectable = selectable; 175 } 176 177 public String getMutable() { 178 return mutable; 179 } 180 181 public void setMutable(String mutable) { 182 this.mutable = mutable; 183 } 184 185 public String getNameReference() { 186 return nameReference; 187 } 188 189 public void setNameReference(String nameReference) { 190 this.nameReference = nameReference; 191 } 192 193 public String getDisabledReference() { 194 return disabledReference; 195 } 196 197 public void setDisabledReference(String disabledReference) { 198 this.disabledReference = disabledReference; 199 } 200 201 public String getRequired() { 202 return required; 203 } 204 205 public void setRequired(String required) { 206 this.required = required; 207 } 208 209 public String getMode() { 210 return mode; 211 } 212 213 public void setMode(String mode) { 214 this.mode = mode; 215 } 216 217 public void setTipReference(String tipReference) { 218 this.tipReference = tipReference; 219 } 220 221 public String getTabIndex() { 222 return tabIndex; 223 } 224 225 public void setTabIndex(String tabIndex) { 226 this.tabIndex = tabIndex; 227 } 228 }