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 QueryDistinctTag extends CloudReferrerTag implements QueryContainerReferrer { 27 28 30 protected Attribute container = Attribute.NULL; 31 32 protected Attribute distinct = Attribute.NULL; 33 34 35 public void setContainer(String c) throws JspTagException { 36 container = getAttribute(c); 37 } 38 39 public void setValue(String a) throws JspTagException { 40 distinct = getAttribute(a); 41 } 42 43 44 public int doStartTag() throws JspTagException { 45 QueryContainer c = (QueryContainer) findParentTag(QueryContainer.class, (String ) container.getValue(this)); 46 Query query = c.getQuery(); 47 query.setDistinct(distinct.getBoolean(this, true)); 48 return SKIP_BODY; 49 } 50 51 } 52 | Popular Tags |