KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > cofax > taglibs > ExecuteTag


1 /*
2  * ExecuteTag is part of the Cofax content management system library.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Please see http://www.cofax.org for contact information and other related informaion.
19  *
20  * $Header: /cvsroot/cofax/cofax/src/org/cofax/taglibs/ExecuteTag.java,v 1.3.2.1 2006/12/11 16:27:38 fxrobin Exp $
21  */

22
23 package org.cofax.taglibs;
24
25 import javax.servlet.jsp.*;
26 import javax.servlet.jsp.tagext.*;
27
28 /**
29  * ExecuteTag is a child tag of PackageTag. It calls PackageTag's execute
30  * function that queries the database and prepares the results.
31  */

32 public class ExecuteTag extends TagSupport {
33
34     /**
35      * Call PackageTag's execute function that queries the database and prepares
36      * the results.
37      */

38     public int doStartTag() throws JspException {
39         PackageTag parent = (PackageTag) findAncestorWithClass(this, PackageTag.class);
40
41         if (!parent.getAction().equals("")) {
42             parent.execute();
43             return (EVAL_BODY_INCLUDE);
44         } else {
45             parent.printMessage("No packageTag Action name exist " + parent.getAction());
46             return (SKIP_BODY);
47         }
48
49     }
50
51 }
52
Popular Tags