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 QueryOffsetTag extends CloudReferrerTag implements QueryContainerReferrer { 27 28 30 protected Attribute container = Attribute.NULL; 31 32 protected Attribute offset = 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 offset = 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 47 query.setOffset(offset.getInt(this, 0)); 48 return SKIP_BODY; 49 } 50 51 } 52 | Popular Tags |