Skip to content

Controllers functions

Jerome Lepage edited this page Oct 11, 2016 · 2 revisions

Main functions

getContext()

Get the current context of the request (see Main concepts section)

getSession()

Get the current (cffwk) Session object

getRequest()

Get the current HttpRequest object

getRequest().get(arg, defaultValue)

Return a POST/GET argument value from request, if not exists return defaultValue.

isMethod(method)

-- Deprecated --
Test if matching the current http method

get(objectName)

Call IOC subsystem to get an object (bean, DAO or service)

.

Authentication functions

signInUser(login, password)

Login a user througt user DAO implementation.

signOutUser()

Logout the current user

redirectAnonymous()

Redirect an anonymous user to sign-in page

.

Rendering and response functions

redirect(url, hard)

Redirect the current request to another URL. If "hard" boolean parameter is true then the redirection is a browser redirect. Otherwise it's an internal redirect.

getRender().render(view, args, layout)

Render the view with args passed by argument.

Clone this wiki locally