01: package com.salmonllc.jsp.tags;
02:
03: /////////////////////////
04: //$Archive: /SOFIA/SourceCode/com/salmonllc/jsp/tags/HtmlEndBodyTag.java $
05: //$Author: Srufle $
06: //$Revision: 17 $
07: //$Modtime: 9/26/04 10:55a $
08: /////////////////////////
09:
10: import com.salmonllc.jsp.*;
11: import javax.servlet.jsp.*;
12:
13: /**
14: * This tag is used to implement the Html End Body tag
15: */
16:
17: public class HtmlEndBodyTag extends BaseEmptyTag {
18: /**
19: * This method must be implemented by each subclass of this tag. Each tag except NestedTags has an Html or Jsp Component associated with it. This method must be implemented to insure that the correct component gets created.
20: */
21: public com.salmonllc.html.HtmlComponent createComponent() {
22: return null;
23: }
24:
25: /**
26: * This method is called when necessary to generate the required html for a tag. It should be overridden by tags that have more Html to generate (generally tags that require several passes to complete).
27: */
28:
29: protected void generateComponentHTML(JspWriter w) throws Exception {
30: JspController cont = getHelper().getController();
31: JspController sec = cont.getSecondaryController();
32: if (!getHelper().getTagContext().getDreamWeaverMode()
33: && (cont.getCurrentRequest().getMethod().equals("GET")
34: || cont.getDisableRedirect() || cont
35: .isRequestFromForward())) {
36: cont.writeNamedHtml(w);
37: w.println("<SCRIPT>");
38: w.println("function " + cont.getOnLoadFunction() + "{");
39: cont.generateScriptHtml(w);
40: if (sec != null)
41: sec.generateScriptHtml(w);
42: w.println("}");
43: cont.writeNamedScripts(w);
44: if (sec != null)
45: sec.writeNamedScripts(w);
46: w.println("</SCRIPT>");
47: }
48: w.print("</body>");
49: }
50: }
|