1 4 package org.apache.myfaces.custom.popup; 5 6 import org.apache.myfaces.component.UserRoleAware; 7 import org.apache.myfaces.taglib.html.HtmlComponentTagBase; 8 9 import javax.faces.component.UIComponent; 10 11 35 public class HtmlPopupTag 36 extends HtmlComponentTagBase 37 { 38 40 42 44 46 private String _enabledOnUserRole; 48 private String _visibleOnUserRole; 49 private String _displayAtDistanceX = null; 50 private String _displayAtDistanceY = null; 51 private String _closePopupOnExitingElement = null; 52 private String _closePopupOnExitingPopup = null; 53 54 public void release() { 55 super.release(); 56 57 _enabledOnUserRole = null; 58 _visibleOnUserRole = null; 59 _displayAtDistanceX = null; 60 _displayAtDistanceY = null; 61 _closePopupOnExitingElement = null; 62 _closePopupOnExitingPopup = null; 63 64 } 65 66 public String getComponentType() 67 { 68 return HtmlPopup.COMPONENT_TYPE; 69 } 70 71 public String getRendererType() 72 { 73 return HtmlPopupRenderer.RENDERER_TYPE; 74 } 75 76 protected void setProperties(UIComponent component) 77 { 78 super.setProperties(component); 79 80 setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole); 81 setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole); 82 setIntegerProperty(component,"displayAtDistanceX",_displayAtDistanceX); 83 setIntegerProperty(component,"displayAtDistanceY",_displayAtDistanceY); 84 setBooleanProperty(component,"closePopupOnExitingElement",_closePopupOnExitingElement); 85 setBooleanProperty(component,"closePopupOnExitingPopup",_closePopupOnExitingPopup); 86 } 87 88 public void setEnabledOnUserRole(String enabledOnUserRole) 90 { 91 _enabledOnUserRole = enabledOnUserRole; 92 } 93 94 public void setVisibleOnUserRole(String visibleOnUserRole) 95 { 96 _visibleOnUserRole = visibleOnUserRole; 97 } 98 99 public void setDisplayAtDistanceX(String displayAtDistanceX) 100 { 101 _displayAtDistanceX = displayAtDistanceX; 102 } 103 104 public void setDisplayAtDistanceY(String displayAtDistanceY) 105 { 106 _displayAtDistanceY = displayAtDistanceY; 107 } 108 109 public void setClosePopupOnExitingElement(String closePopupOnExitingElement) 110 { 111 _closePopupOnExitingElement = closePopupOnExitingElement; 112 } 113 114 public void setClosePopupOnExitingPopup(String closePopupOnExitingPopup) 115 { 116 _closePopupOnExitingPopup = closePopupOnExitingPopup; 117 } 118 } 119 | Popular Tags |