KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > sqltable > SqlTableNestedTag


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.sqltable;
14
15 import javax.servlet.jsp.JspException JavaDoc;
16 import javax.servlet.jsp.tagext.TagSupport JavaDoc;
17
18 import com.tonbeller.tbutils.res.Resources;
19
20 /**
21  * @author av
22  * @since Oct 6, 2004
23  */

24 public abstract class SqlTableNestedTag extends TagSupport JavaDoc {
25
26   protected SqlTableTag getTableTag() throws JspException JavaDoc {
27     SqlTableTag tag = (SqlTableTag) findAncestorWithClass(this, SqlTableTag.class);
28     if (tag == null)
29       throw new JspException JavaDoc(getClass().getName() + " tag must be nested inside an SqlTable Tag");
30     return tag;
31   }
32
33   protected SqlTable getTable() throws JspException JavaDoc {
34     return getTableTag().getTable();
35   }
36
37   protected Resources getResources() throws JspException JavaDoc {
38     return getTableTag().getResources();
39   }
40   
41   protected boolean isRenderActions() throws JspException JavaDoc {
42     return getTableTag().isRenderActions();
43   }
44 }
45
Popular Tags