HttpViewContext

module:most-web.mvc. HttpViewContext

new HttpViewContext(context)

Encapsulates information that is related to rendering a view.
Parameters:
Name Type Description
context HttpContext
Properties:
Name Type Description
model DataModel
html HtmlWriter
Source:

Extends

  • EventEmitter

Members

body :String

Gets or sets the body of the current view
Type:
  • String
Source:

context :HttpContext

Represents the current HTTP context
Type:
Source:

data :String

Gets or sets the view data
Type:
  • String
Source:

layout :String

Gets or sets the view layout page if the view will be fully rendered
Type:
  • String
Source:

title :String

Gets or sets the title of the page if the view will be fully rendered
Type:
  • String
Source:

writer :HtmlWriter

Type:
  • HtmlWriter
Source:

Methods

$T(s, libopt) → {String}

Parameters:
Name Type Attributes Description
s String
lib String <optional>
Source:
Returns:
Type
String

render(url) → {string}

Parameters:
Name Type Description
url String
Source:
Returns:
Type
string

translate(s, libopt) → {String}

Parameters:
Name Type Attributes Description
s String
lib String <optional>
Source:
Returns:
Type
String