KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > jsp > taglib > ListReferrerTag


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.bridge.jsp.taglib;
11
12 import org.mmbase.bridge.jsp.taglib.util.Attribute;
13 import javax.servlet.jsp.JspTagException JavaDoc;
14 import javax.servlet.jsp.jstl.core.*;
15
16 /**
17  * Tags that can be used inside a list tag.
18  *
19  * @author Michiel Meeuwissen
20  *
21  * @version $Id: ListReferrerTag.java,v 1.10 2005/12/05 17:21:17 michiel Exp $
22  */

23
24 public abstract class ListReferrerTag extends ContextReferrerTag {
25
26     protected Attribute parentListId = Attribute.NULL;
27     
28     public void setList(String JavaDoc l) throws JspTagException JavaDoc {
29         parentListId = getAttribute(l);
30     }
31
32     protected ListProvider getList() throws JspTagException JavaDoc {
33         // find the parent list:
34
return (ListProvider) findParentTag(ListProvider.class, (String JavaDoc) parentListId.getValue(this));
35     }
36
37     /**
38      * @since MMBase-1.8
39      */

40     protected LoopTag getLoopTag() throws JspTagException JavaDoc {
41         // find the parent list:
42
return (LoopTag) findParentTag(LoopTag.class, (String JavaDoc) parentListId.getValue(this));
43     }
44  
45
46 }
47
Popular Tags