1 10 package org.mmbase.applications.community.taglib; 11 12 import javax.servlet.jsp.JspTagException ; 13 14 import org.mmbase.bridge.Node; 15 import org.mmbase.bridge.Module; 16 17 import org.mmbase.bridge.jsp.taglib.*; 18 19 25 26 public class SetInfoTag extends NodeReferrerTag { 27 28 protected Node node; 29 private String key=null; 30 31 public void setKey(String k) throws JspTagException { 32 key = getAttributeValue(k); 33 } 34 35 public int doStartTag() throws JspTagException { 36 node = getNode(); 38 39 if (key == null) { throw new JspTagException ("Should use 'key' attribute"); 41 } 42 return EVAL_BODY_BUFFERED; 43 } 44 45 49 public int doAfterBody() throws JspTagException { 50 String value=bodyContent.getString(); 51 Module community=getCloudContext().getModule("communityprc"); 52 community.getInfo("MESSAGE-"+node.getNumber()+"-SETINFOFIELD-"+key+"-"+value,pageContext.getRequest(),pageContext.getResponse()); 53 return SKIP_BODY; 54 } 55 } 56 | Popular Tags |