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.UIRecentSpacesShelfItem; 25 26 29 public class RecentSpacesShelfItemTag extends BaseComponentTag 30 { 31 34 public String getComponentType() 35 { 36 return "org.alfresco.faces.RecentSpacesShelfItem"; 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 setStringBindingProperty(component, "value", this.value); 55 if (isValueReference(this.navigateActionListener)) 56 { 57 MethodBinding vb = getFacesContext().getApplication().createMethodBinding(this.navigateActionListener, ACTION_CLASS_ARGS); 58 ((UIRecentSpacesShelfItem)component).setNavigateActionListener(vb); 59 } 60 else 61 { 62 throw new FacesException("Navigate Action listener method binding incorrectly specified: " + this.navigateActionListener); 63 } 64 } 65 66 69 public void release() 70 { 71 super.release(); 72 73 this.value = null; 74 this.navigateActionListener = null; 75 } 76 77 82 public void setValue(String value) 83 { 84 this.value = value; 85 } 86 87 92 public void setNavigateActionListener(String navigateActionListener) 93 { 94 this.navigateActionListener = navigateActionListener; 95 } 96 97 98 99 private String navigateActionListener; 100 101 102 private String value; 103 } 104 | Popular Tags |