1 17 package org.alfresco.web.ui.repo.tag.shelf; 18 19 import javax.faces.FacesException; 20 import javax.faces.component.UIComponent; 21 import javax.faces.el.MethodBinding; 22 23 import org.alfresco.web.ui.common.tag.BaseComponentTag; 24 import org.alfresco.web.ui.repo.component.shelf.UIShelf; 25 26 29 public class ShelfTag extends BaseComponentTag 30 { 31 34 public String getComponentType() 35 { 36 return "org.alfresco.faces.Shelf"; 37 } 38 39 42 public String getRendererType() 43 { 44 return null; 46 } 47 48 51 protected void setProperties(UIComponent component) 52 { 53 super.setProperties(component); 54 55 setStringProperty(component, "groupPanel", this.groupPanel); 56 setStringProperty(component, "groupBgcolor", this.groupBgcolor); 57 setStringProperty(component, "selectedGroupPanel", this.selectedGroupPanel); 58 setStringProperty(component, "selectedGroupBgcolor", this.selectedGroupBgcolor); 59 setStringProperty(component, "innerGroupPanel", this.innerGroupPanel); 60 setStringProperty(component, "innerGroupBgcolor", this.innerGroupBgcolor); 61 if (this.groupExpandedActionListener != null) 62 { 63 if (isValueReference(this.groupExpandedActionListener)) 64 { 65 MethodBinding vb = getFacesContext().getApplication().createMethodBinding(this.groupExpandedActionListener, ACTION_CLASS_ARGS); 66 ((UIShelf)component).setGroupExpandedActionListener(vb); 67 } 68 else 69 { 70 throw new FacesException("Shelf Group Expanded Action listener method binding incorrectly specified: " + this.groupExpandedActionListener); 71 } 72 } 73 } 74 75 78 public void release() 79 { 80 super.release(); 81 82 this.groupPanel = null; 83 this.groupBgcolor = null; 84 this.selectedGroupPanel = null; 85 this.selectedGroupBgcolor = null; 86 this.innerGroupPanel = null; 87 this.innerGroupBgcolor = null; 88 this.groupExpandedActionListener = null; 89 } 90 91 96 public void setGroupPanel(String groupPanel) 97 { 98 this.groupPanel = groupPanel; 99 } 100 101 106 public void setGroupBgcolor(String groupBgcolor) 107 { 108 this.groupBgcolor = groupBgcolor; 109 } 110 111 116 public void setSelectedGroupPanel(String selectedGroupPanel) 117 { 118 this.selectedGroupPanel = selectedGroupPanel; 119 } 120 121 126 public void setSelectedGroupBgcolor(String selectedGroupBgcolor) 127 { 128 this.selectedGroupBgcolor = selectedGroupBgcolor; 129 } 130 131 136 public void setInnerGroupPanel(String innerGroupPanel) 137 { 138 this.innerGroupPanel = innerGroupPanel; 139 } 140 141 146 public void setInnerGroupBgcolor(String innerGroupBgcolor) 147 { 148 this.innerGroupBgcolor = innerGroupBgcolor; 149 } 150 151 156 public void setGroupExpandedActionListener(String groupExpandedActionListener) 157 { 158 this.groupExpandedActionListener = groupExpandedActionListener; 159 } 160 161 162 163 private String groupExpandedActionListener; 164 165 166 private String groupPanel; 167 168 169 private String groupBgcolor; 170 171 172 private String selectedGroupPanel; 173 174 175 private String selectedGroupBgcolor; 176 177 178 private String innerGroupPanel; 179 180 181 private String innerGroupBgcolor; 182 } 183 | Popular Tags |