1 16 package org.apache.myfaces.custom.date; 17 18 import javax.faces.component.UIComponent; 19 20 import org.apache.myfaces.component.UserRoleAware; 21 import org.apache.myfaces.taglib.html.HtmlInputTextTagBase; 22 23 29 public class HtmlInputDateTag extends HtmlInputTextTagBase { 30 public String getComponentType() { 31 return HtmlInputDate.COMPONENT_TYPE; 32 } 33 34 public String getRendererType() { 35 return "org.apache.myfaces.Date"; 36 } 37 38 private String type; 40 private String popupCalendar; 41 42 46 49 52 private String enabledOnUserRole; 54 private String visibleOnUserRole; 55 56 public void release() { 57 super.release(); 58 enabledOnUserRole=null; 59 visibleOnUserRole=null; 60 type=null; 61 popupCalendar=null; 62 } 63 64 protected void setProperties(UIComponent component) { 65 super.setProperties(component); 66 67 setStringProperty(component, "type", type); 68 setBooleanProperty(component, "popupCalendar", popupCalendar); 69 70 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, enabledOnUserRole); 71 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, visibleOnUserRole); 72 } 73 74 public void setType(String type){ 75 this.type = type; 76 } 77 78 public void setPopupCalendar(String popupCalendar){ 79 this.popupCalendar = popupCalendar; 80 } 81 82 public void setEnabledOnUserRole(String enabledOnUserRole){ 83 this.enabledOnUserRole = enabledOnUserRole; 84 } 85 86 public void setVisibleOnUserRole(String visibleOnUserRole){ 87 this.visibleOnUserRole = visibleOnUserRole; 88 } 89 } | Popular Tags |