Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/newsfighter/layout/jsptags/PanelsTag.java


1   /*
2    * PanelsTag.java
3    *
4    * Created on February 17, 2003, 4:10 PM
5    */
6   
7   package com.newsfighter.layout.jsptags;
8   
9   import javax.servlet.jsp.*;
10  import javax.servlet.jsp.tagext.*;
11  
12  /** <!-- =============================================================== -->
13   * Creates an environment for the panels to reside in.  This amounts to
14   * a simple table structure.  The <code>PanelsTag</code> is not skin
15   * sensitive, and carries no reference to its enclosing
16   * <code>ManagerTag</code>.
17   *@author  <a href="mailto:n_alex_rupp@users.sourceforge.net">N. Alex Rupp</a>
18   */
19  public class PanelsTag extends BodyTagSupport {
20      
21      /** <!-- =============================================================== -->
22       * doStartTag is called by the JSP container when the tag is encountered
23       *
24       * @return <code>EVAL_BODY_INCLUDE</code>
25       */    
26      public int doStartTag() {
27          try {
28              JspWriter out = pageContext.getOut();
29              out.println("");
30              out.println("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">");
31              out.print("\t<tr>");
32              
33              
34          } catch (Exception ex) {
35              throw new Error(" ==== Error in PanelsTag doStartTag()");
36          }
37          
38          return EVAL_BODY_INCLUDE;
39      }
40      
41      // ============================================================
42      
43      /** <!-- =============================================================== -->
44       * doStartTag is called by the JSP container when the tag is closed
45       *
46       * @return <code>EVAL_PAGE</code>
47       */    
48      public int doEndTag(){
49          try {
50              JspWriter out = pageContext.getOut();
51              out.println("");
52              out.println("\t\t</td>"); // should be xml driven
53              out.println("\t<tr>");
54              out.println("</table>");
55              
56              
57          } catch (Exception ex){
58              throw new Error("==== Error in PanelsTag doEndTag()");
59          }
60          return EVAL_PAGE;
61      }
62  }
63