KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > webapp > taglib > core > menu > context > ItemEnabledTag


1 package com.blandware.atleap.webapp.taglib.core.menu.context;
2
3 import javax.servlet.jsp.JspException JavaDoc;
4 import java.io.IOException JavaDoc;
5
6 /**
7  * <p>Renders body when enclosing item is enabled.
8  * <br />
9  * This tag is only valid when nested within <em>item</em> tag.
10  * </p>
11  * <p>
12  * Note: tag body may be rendered twice: first time for including in context
13  * menu, second time for including in page (if needed).
14  * </p>
15  * <p><a HREF="ItemEnabledTag.java.htm"><i>View Source</i></a></p>
16  *
17  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
18  * @version $Revision: 1.4 $ $Date: 2005/10/31 07:19:35 $
19  * @see ItemTag
20  * @see ItemDisabledTag
21  * @jsp.tag name="itemEnabled"
22  * body-content="scriptless"
23  */

24 public class ItemEnabledTag extends ItemPartSupport implements ItemPart {
25
26     /**
27      * Creates new instance of ItemEnabledTag
28      */

29     public ItemEnabledTag() {
30     }
31
32     /**
33      * Performs tag logic
34      *
35      * @throws JspException
36      * @throws IOException
37      */

38     public void doTag() throws JspException JavaDoc, IOException JavaDoc {
39
40         // set internal flag to true. It means that body content msut be
41
// processed if and only if 'enabled' field of parent item tag is set
42
// to true
43
enabled = true;
44         super.doTag();
45
46     }
47 }
48
Popular Tags