Controller

SGAppsServer.NodeJsMvc. Controller

new Controller(controllerName, options, server)

Source:
Parameters:
Name Type Description
controllerName string
options object
Properties
Name Type Attributes Description
shared object <optional>
server SGAppsServer

Classes

Action

Members

_actions :Object.<string, SGAppsServer.NodeJsMvc.Controller.Action>

Source:
Type:

_views :Object.<string, SGAppsServer.NodeJsMvc.Controller.View>

Source:
Type:

name :string

Source:
Type:
  • string

shared :Object.<string, any>

Source:
Type:
  • Object.<string, any>

viewer :TemplateManagerViewer

Source:
Type:

Methods

actionExists(actionName) → {boolean}

Source:
Parameters:
Name Type Description
actionName string
Returns:
Type
boolean

addAction(actionName, options) → {boolean}

Source:
Parameters:
Name Type Description
actionName string
options object
Returns:
Type
boolean

addView(view) → {SGAppsServer.NodeJsMvc.Controller.View}

Source:
Parameters:
Name Type Description
view SGAppsServer.NodeJsMvc.Controller.View
Returns:
Type
SGAppsServer.NodeJsMvc.Controller.View

getAction(actionName) → {SGAppsServer.NodeJsMvc.Controller.Action}

Source:
Parameters:
Name Type Description
actionName string
Returns:
Type
SGAppsServer.NodeJsMvc.Controller.Action

getView(viewName) → {SGAppsServer.NodeJsMvc.Controller.View}

Source:
Parameters:
Name Type Description
viewName string
Returns:
Type
SGAppsServer.NodeJsMvc.Controller.View

removeAction(actionName) → {boolean}

Source:
Parameters:
Name Type Description
actionName string
Returns:
Type
boolean

removeView(viewName) → {boolean}

Source:
Parameters:
Name Type Description
viewName string
Returns:
Type
boolean

render(response, viewName, optionsopt)

Source:
Parameters:
Name Type Attributes Description
response SGAppsServerResponse
viewName string
options object <optional>

viewExists(viewName) → {boolean}

Source:
Parameters:
Name Type Description
viewName string
Returns:
Type
boolean

Type Definitions

View

Source:
Properties:
Name Type Description
name string
path string
code string
Type:
  • object

View

Source:
Properties:
Name Type Description
name string
path string
code string
Type:
  • object