1 10 package org.mmbase.bridge.jsp.taglib.security; 11 import org.mmbase.bridge.jsp.taglib.NodeReferrerTag; 12 import org.mmbase.bridge.jsp.taglib.util.Attribute; 13 import javax.servlet.jsp.JspTagException ; 14 15 import org.mmbase.util.logging.Logger; 16 import org.mmbase.util.logging.Logging; 17 18 24 25 public class SetContextTag extends NodeReferrerTag { 26 27 private static final Logger log = Logging.getLoggerInstance(SetContextTag.class); 28 private Attribute name = Attribute.NULL; 29 30 public void setName(String n) throws JspTagException { 31 name = getAttribute(n); 32 } 33 34 public int doEndTag() throws JspTagException { 35 String n; 36 if (name == Attribute.NULL) { 37 n = bodyContent.getString(); 38 } else { 39 n = name.getString(this); 40 } 41 if (log.isDebugEnabled()) log.debug("Setting context to " + n); 42 getNode().setContext(n); 43 return super.doEndTag(); 44 } 45 46 } 47 | Popular Tags |