KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > view > jsp > html > BaseControllerTag


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.view.jsp.html;
8
9
10 import javax.servlet.jsp.JspException JavaDoc;
11
12 import com.inversoft.verge.mvc.view.jsp.JspTools;
13
14
15 /**
16  * <p>
17  * This class is the base class for all controller tags in
18  * the Inversoft Portal framework.
19  * </p>
20  *
21  * @author Brian Pontarelli
22  * @since 2.0
23  * @version 2.0
24  */

25 public class BaseControllerTag extends InputTag {
26
27     private String JavaDoc action;
28     protected String JavaDoc localAction;
29
30
31     /**
32      * Retrieves the tags action attribute
33      *
34      * @return The tags action attribute
35      */

36     public String JavaDoc getAction() {
37         return action;
38     }
39
40     /**
41      * Populates the tags action attribute
42      *
43      * @param action The tags action attribute
44      */

45     public void setAction(String JavaDoc action) {
46         this.action = action;
47     }
48
49
50     /**
51      * This method calls the super initialize method and then converts all the
52      * variables in the action property to their values
53      *
54      * @throws JspException If the InputTag.initialize method throws an exception
55      */

56     protected void initialize() throws JspException JavaDoc {
57
58         super.initialize();
59
60         // Since the action is required, it is okay to set the member to the new
61
// value because if the tag is reused, it will be set again
62
localAction = action;
63         if (action != null && JspTools.JSP_20) {
64             localAction = (String JavaDoc) JspTools.expand("action", action, String JavaDoc.class,
65                 this, pageContext);
66         }
67     }
68 }
Popular Tags