1 16 package org.apache.myfaces.custom.layout; 17 18 import org.apache.myfaces.component.UserRoleAware; 19 import org.apache.myfaces.renderkit.html.HTML; 20 import org.apache.myfaces.taglib.html.HtmlComponentBodyTagBase; 21 22 import javax.faces.component.UIComponent; 23 24 50 public class HtmlPanelLayoutTag 51 extends HtmlComponentBodyTagBase 52 { 53 public String getComponentType() 54 { 55 return HtmlPanelLayout.COMPONENT_TYPE; 56 } 57 58 public String getRendererType() 59 { 60 return "org.apache.myfaces.Layout"; 61 } 62 63 65 67 69 71 private String _layout; 73 private String _headerClass; 74 private String _navigationClass; 75 private String _bodyClass; 76 private String _footerClass; 77 private String _headerStyle; 78 private String _navigationStyle; 79 private String _bodyStyle; 80 private String _footerStyle; 81 82 private String _align; 84 private String _bgcolor; 85 private String _border; 86 private String _cellpadding; 87 private String _cellspacing; 88 private String _datafld; 89 private String _datasrc; 90 private String _dataformatas; 91 private String _frame; 92 private String _rules; 93 private String _summary; 94 private String _width; 95 96 private String _enabledOnUserRole; 98 private String _visibleOnUserRole; 99 100 101 public void release() { 102 super.release(); 103 _layout=null; 104 _headerClass=null; 105 _navigationClass=null; 106 _bodyClass=null; 107 _footerClass=null; 108 _headerStyle=null; 109 _navigationStyle=null; 110 _bodyStyle=null; 111 _footerStyle=null; 112 _align=null; 113 _bgcolor=null; 114 _border=null; 115 _cellpadding=null; 116 _cellspacing=null; 117 _datafld=null; 118 _datasrc=null; 119 _dataformatas=null; 120 _frame=null; 121 _rules=null; 122 _summary=null; 123 _width=null; 124 _enabledOnUserRole=null; 125 _visibleOnUserRole=null; 126 } 127 protected void setProperties(UIComponent component) 128 { 129 super.setProperties(component); 130 131 setStringProperty(component, "layout", _layout); 132 setStringProperty(component, "headerClass", _headerClass); 133 setStringProperty(component, "navigationClass", _navigationClass); 134 setStringProperty(component, "bodyClass", _bodyClass); 135 setStringProperty(component, "footerClass", _footerClass); 136 setStringProperty(component, "headerStyle", _headerStyle); 137 setStringProperty(component, "navigationStyle", _navigationStyle); 138 setStringProperty(component, "bodyStyle", _bodyStyle); 139 setStringProperty(component, "footerStyle", _footerStyle); 140 141 setStringProperty(component, HTML.ALIGN_ATTR, _align); 142 setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor); 143 setStringProperty(component, HTML.BORDER_ATTR, _border); 144 setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding); 145 setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing); 146 setStringProperty(component, HTML.DATAFLD_ATTR, _datafld); 147 setStringProperty(component, HTML.DATASRC_ATTR, _datasrc); 148 setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas); 149 setStringProperty(component, HTML.FRAME_ATTR, _frame); 150 setStringProperty(component, HTML.RULES_ATTR, _rules); 151 setStringProperty(component, HTML.SUMMARY_ATTR, _summary); 152 setStringProperty(component, HTML.WIDTH_ATTR, _width); 153 154 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 155 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 156 } 157 158 public void setLayout(String layout) 159 { 160 _layout = layout; 161 } 162 163 public void setHeaderClass(String headerClass) 164 { 165 _headerClass = headerClass; 166 } 167 168 public void setNavigationClass(String navigationClass) 169 { 170 _navigationClass = navigationClass; 171 } 172 173 public void setBodyClass(String bodyClass) 174 { 175 _bodyClass = bodyClass; 176 } 177 178 public void setFooterClass(String footerClass) 179 { 180 _footerClass = footerClass; 181 } 182 183 public void setHeaderStyle(String headerStyle) 184 { 185 _headerStyle = headerStyle; 186 } 187 188 public void setNavigationStyle(String navigationStyle) 189 { 190 _navigationStyle = navigationStyle; 191 } 192 193 public void setBodyStyle(String bodyStyle) 194 { 195 _bodyStyle = bodyStyle; 196 } 197 198 public void setFooterStyle(String footerStyle) 199 { 200 _footerStyle = footerStyle; 201 } 202 203 public void setAlign(String align) 204 { 205 _align = align; 206 } 207 208 public void setBgcolor(String bgcolor) 209 { 210 _bgcolor = bgcolor; 211 } 212 213 public void setBorder(String border) 214 { 215 _border = border; 216 } 217 218 public void setCellpadding(String cellpadding) 219 { 220 _cellpadding = cellpadding; 221 } 222 223 public void setCellspacing(String cellspacing) 224 { 225 _cellspacing = cellspacing; 226 } 227 228 public void setDatafld(String datafld) 229 { 230 _datafld = datafld; 231 } 232 233 public void setDatasrc(String datasrc) 234 { 235 _datasrc = datasrc; 236 } 237 238 public void setDataformatas(String dataformatas) 239 { 240 _dataformatas = dataformatas; 241 } 242 243 public void setFrame(String frame) 244 { 245 _frame = frame; 246 } 247 248 public void setRules(String rules) 249 { 250 _rules = rules; 251 } 252 253 public void setSummary(String summary) 254 { 255 _summary = summary; 256 } 257 258 public void setWidth(String width) 259 { 260 _width = width; 261 } 262 263 public void setEnabledOnUserRole(String enabledOnUserRole) 264 { 265 _enabledOnUserRole = enabledOnUserRole; 266 } 267 268 public void setVisibleOnUserRole(String visibleOnUserRole) 269 { 270 _visibleOnUserRole = visibleOnUserRole; 271 } 272 } 273 | Popular Tags |