Class page
The page object is what gets rendered by default at the end of a request.
Defined in: <global\page.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
page()
The page object is what gets rendered by default at the end of a request.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
page.render()
Renders the entire current page to a string.
|
| <static> |
page.setFavicon(url)
Sets the favicon of the page.
|
| <static> |
page.setMode(newMode)
Changes the mode of response output to something other than
HTML.
|
| <static> |
page.setTitle(newTitle)
Sets the HTML title tag of the page.
|
| <static> |
page.showRenderTime(show)
Sets whether or not to print the number of milliseconds taken to render
the page in the page's footer.
|
Method Detail
<static>
{string}
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
<static>
page.setFavicon(url)
Sets the favicon of the page.
- Parameters:
- {string} url
- A URL pointing to the image to use as a favicon.
<static>
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']
<static>
page.setTitle(newTitle)
Sets the HTML title tag of the page.
- Parameters:
- {string} newTitle
<static>
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