1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.wotonomy.web;
20
21 /***
22 * This class represents a static portion of a web page.
23 * Package access only, as it is not in the specification.
24 *
25 * @author michael@mpowers.net
26 * @author $Author: cgruber $
27 * @version $Revision: 893 $
28 */
29 class WOStaticElement extends WOElement
30 {
31 String content;
32
33 /***
34 * Default constructor.
35 */
36 public WOStaticElement()
37 {
38 content = null;
39 }
40
41 /***
42 * Returns a static element representing the specified content.
43 */
44 public WOStaticElement( String aContentString )
45 {
46 this();
47 content = aContentString;
48 }
49
50 /***
51 * Overridden to append the content string..
52 */
53 public void appendToResponse (WOResponse aResponse, WOContext aContext)
54 {
55 aResponse.appendContentString( content );
56 }
57
58
59 public WOResponse generateResponse()
60 {
61 WOResponse r = new WOResponse();
62 if (content != null)
63 {
64 r.appendContentString(content);
65 }
66 return r;
67 }
68
69
70 }