1 16 package org.apache.myfaces.custom.datalist; 17 18 import org.apache.myfaces.component.UserRoleAware; 19 import org.apache.myfaces.renderkit.JSFAttr; 20 import org.apache.myfaces.taglib.html.HtmlComponentBodyTagBase; 21 22 import javax.faces.component.UIComponent; 23 24 50 public class HtmlDataListTag 51 extends HtmlComponentBodyTagBase 52 { 53 55 public String getComponentType() 56 { 57 return HtmlDataList.COMPONENT_TYPE; 58 } 59 60 public String getRendererType() 61 { 62 return "org.apache.myfaces.List"; 63 } 64 65 67 69 71 73 private String _rows; 75 private String _var; 76 private String _first; 77 78 private String _layout; 80 private String _rowIndexVar; 81 private String _rowCountVar; 82 83 private String _enabledOnUserRole; 85 private String _visibleOnUserRole; 86 87 public void release() { 88 super.release(); 89 _rows=null; 90 _var=null; 91 _first=null; 92 _layout=null; 93 _rowIndexVar=null; 94 _rowCountVar=null; 95 _enabledOnUserRole=null; 96 _visibleOnUserRole=null; 97 } 98 99 protected void setProperties(UIComponent component) 100 { 101 super.setProperties(component); 102 103 setIntegerProperty(component, JSFAttr.ROWS_ATTR, _rows); 104 setStringProperty(component, JSFAttr.VAR_ATTR, _var); 105 setIntegerProperty(component, JSFAttr.FIRST_ATTR, _first); 106 107 setStringProperty(component, JSFAttr.LAYOUT_ATTR, _layout); 108 setStringProperty(component, "rowIndexVar", _rowIndexVar); 109 setStringProperty(component, "rowCountVar", _rowCountVar); 110 111 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 112 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 113 } 114 115 public void setRows(String rows) 116 { 117 _rows = rows; 118 } 119 120 public void setVar(String var) 121 { 122 _var = var; 123 } 124 125 public void setFirst(String first) 126 { 127 _first = first; 128 } 129 130 public void setLayout(String layout) 131 { 132 _layout = layout; 133 } 134 135 public void setRowIndexVar(String rowIndexVar) 136 { 137 _rowIndexVar = rowIndexVar; 138 } 139 140 public void setRowCountVar(String rowCountVar) 141 { 142 _rowCountVar = rowCountVar; 143 } 144 145 public void setEnabledOnUserRole(String enabledOnUserRole) 146 { 147 _enabledOnUserRole = enabledOnUserRole; 148 } 149 150 public void setVisibleOnUserRole(String visibleOnUserRole) 151 { 152 _visibleOnUserRole = visibleOnUserRole; 153 } 154 } 155 | Popular Tags |