1 10 package org.mmbase.bridge.jsp.taglib.containers; 11 12 import javax.servlet.jsp.JspTagException ; 13 14 import org.mmbase.bridge.Query; 15 import org.mmbase.bridge.jsp.taglib.CloudReferrerTag; 16 import org.mmbase.bridge.jsp.taglib.util.Attribute; 17 19 26 public class QueryMaxNumberTag extends CloudReferrerTag implements QueryContainerReferrer { 27 28 30 protected Attribute container = Attribute.NULL; 31 32 protected Attribute max = Attribute.NULL; 33 34 public void setContainer(String c) throws JspTagException { 35 container = getAttribute(c); 36 } 37 38 public void setValue(String a) throws JspTagException { 39 max = getAttribute(a); 40 } 41 42 43 public int doStartTag() throws JspTagException { 44 QueryContainer c = (QueryContainer) findParentTag(QueryContainer.class, (String ) container.getValue(this)); 45 Query query = c.getQuery(); 46 query.setMaxNumber(max.getInt(this, -1)); 47 return SKIP_BODY; 48 } 49 50 } 51 | Popular Tags |