GLOBAL INDEX  |  FRAMES  |  NO FRAMES
Library: page
Overview
The page object is what gets rendered by default at the end of a request.
source: page.js
Functions
page.setMode(newMode)
Changes the mode of response output to something other than HTML. For example, setMode("plain") will not print the default AppJet HTML document structure (in fact it will not print anything but your calls to print()). If you setMode("plain"), you are on your own. The default output mode is "html", which creates a simple xhtml document structure.
parameters
string newMode one of ['html', 'plain']
page.setTitle(newTitle)
Sets the HTML title tag of the page.
parameters
string newTitle
page.showRenderTime(show)
Sets whether or not to print the number of milliseconds taken to render the page in the page's footer. Default is true. Applies only to HTML mode.
parameters
boolean show
page.body.write(rawText)
Append a raw string to the page's BODY section.
parameters
string rawText
page.body.get()
Gets the page's BODY section as written so far.
page.head.write(rawText)
Append raw text to the page's HEAD section.
parameters
string rawText
examples
page.head.write("""
<style>
  p { font-size: 200%; }
</style>
""");
page.head.get()
Gets the page's HEAD section as written so far. Useful especially for page mode "plain", when a library might write to the HEAD section.
page.render()
Renders the entire current page to a string. By default, this is called at the end of every request and printed to the response buffer, so usually there is no reason for you to call this.
returns
string rendered HTML string of the current page
Objects
object
page
Generated by JsDoc Toolkit 1.3.3 on Thu, 03 Jul 2008 01:27:42 GMT.