1 23 package org.infoglue.deliver.taglib.management; 24 25 import java.util.HashMap ; 26 import java.util.Map ; 27 28 import javax.servlet.jsp.JspException ; 29 import javax.servlet.jsp.JspTagException ; 30 31 import org.infoglue.deliver.taglib.AbstractTag; 32 33 39 public class UserPropertiesAttributeParameterTag extends AbstractTag 40 { 41 44 private static final long serialVersionUID = 4482006814634520239L; 45 46 49 private String name; 50 51 54 private String value; 55 56 59 public UserPropertiesAttributeParameterTag() 60 { 61 super(); 62 } 63 64 71 public int doEndTag() throws JspException 72 { 73 addUserPropertiesAttribute(); 74 return EVAL_PAGE; 75 } 76 77 78 83 protected void addUserPropertiesAttribute() throws JspException 84 { 85 final RemoteUserPropertiesServiceTag parent = (RemoteUserPropertiesServiceTag) findAncestorWithClass(this, RemoteUserPropertiesServiceTag.class); 86 if(parent == null) 87 { 88 throw new JspTagException ("UserPropertiesAttributeParameterTag must have a RemoteUserPropertiesServiceTag ancestor."); 89 } 90 ((RemoteUserPropertiesServiceTag) parent).addUserPropertiesAttribute(name, value); 91 } 92 93 99 public void setName(final String name) throws JspException 100 { 101 this.name = evaluateString("parameter", "name", name); 102 } 103 104 110 public void setValue(final String value) throws JspException 111 { 112 this.value = evaluateString("parameter", "value", value); 113 } 114 } 115 | Popular Tags |