accessibleProperties()

Use this method to specify which properties can be set through mass assignment.

Name Type Required Default Description
properties string No Property name (or list of property names) that are allowed to be altered through mass assignment.
// Make `isActive` the only property that can be set through mass assignment operations like `updateAll()`.
config() {
	accessibleProperties("isActive");
}
Copied!

addError()

Adds an error on a specific property.

Name Type Required Default Description
property string Yes The name of the property you want to add an error on.
message string Yes The error message (such as "Please enter a correct name in the form field" for example).
name string No A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).
// Add an error to the `email` property.
this.addError(property="email", message="Sorry, you are not allowed to use that email. Try again, please.");
Copied!

addErrorToBase()

Adds an error on a specific property.

Name Type Required Default Description
message string Yes The error message (such as "Please enter a correct name in the form field" for example).
name string No A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).
// Add an error on the object that's not specific to a single property.
this.addErrorToBase(message="Your email address must be the same as your domain name.");
Copied!

addFormat()

Adds a new MIME type to your CFWheels application for use with responding to multiple formats.

Name Type Required Default Description
extension string Yes File extension to add.
mimeType string Yes Matching MIME type to associate with the file extension.
// Add the `js` format
addFormat(extension="js", mimeType="text/javascript");

// Add the `ppt` and `pptx` formats
addFormat(extension="ppt", mimeType="application/vnd.ms-powerpoint");
addFormat(extension="pptx", mimeType="application/vnd.ms-powerpoint");
Copied!

afterCreate()

Registers method(s) that should be called after a new object is created.

Name Type Required Default Description
methods string No Method name or list of method names that should be called when this callback event occurs in an object's life cycle (can also be called with the method argument).
// Instruct CFWheels to call the `fixObj` method after an object has been created.
afterCreate("fixObj");
Copied!
All

accessibleProperties()

addError()

addErrorToBase()

addFormat()

afterCreate()

afterDelete()

afterFind()

afterInitialization()

afterNew()

afterSave()

afterUpdate()

afterValidation()

afterValidationOnCreate()

afterValidationOnUpdate()

allChanges()

allErrors()

authenticityTokenField()

autoLink()

automaticValidations()

average()

beforeCreate()

beforeDelete()

beforeSave()

beforeUpdate()

beforeValidation()

beforeValidationOnCreate()

beforeValidationOnUpdate()

belongsTo()

buttonTag()

buttonTo()

caches()

capitalize()

changedFrom()

changedProperties()

checkBox()

checkBoxTag()

clearChangeInformation()

clearErrors()

collection()

columnDataForProperty()

columnForProperty()

columnNames()

columns()

compareTo()

constraints()

contentFor()

contentForLayout()

controller()

controller()

count()

create()

createMigration()

csrfMetaTags()

cycle()

dataSource()

dateSelect()

dateSelectTags()

dateTimeSelect()

dateTimeSelectTags()

daySelectTag()

delete()

delete()

deleteAll()

deleteByKey()

deleteOne()

deobfuscateParam()

distanceOfTimeInWords()

end()

endFormTag()

errorCount()

errorMessageOn()

errorMessagesFor()

errorsOn()

errorsOnBase()

excerpt()

exists()

fileField()

fileFieldTag()

filterChain()

filters()

findAll()

findAllKeys()

findByKey()

findFirst()

findLast()

findOne()

flash()

flashClear()

flashCount()

flashDelete()

flashInsert()

flashIsEmpty()

flashKeep()

flashKeyExists()

flashMessages()

get()

get()

getAvailableMigrations()

getCurrentMigrationVersion()

getEmails()

getFiles()

getRedirect()

getTableNamePrefix()

hasChanged()

hasErrors()

hasMany()

hasManyCheckBox()

hasManyRadioButton()

hasOne()

hasProperty()

hiddenField()

hiddenFieldTag()

highlight()

hourSelectTag()

humanize()

hyphenize()

imageTag()

includeContent()

includedInObject()

includeLayout()

includePartial()

invokeWithTransaction()

isAjax()

isClass()

isDelete()

isGet()

isHead()

isInstance()

isNew()

isOptions()

isPatch()

isPersisted()

isPost()

isPut()

isSecure()

javaScriptIncludeTag()

key()

linkTo()

mailTo()

mapper()

maximum()

member()

migrateTo()

migrateToLatest()

mimeTypes()

minimum()

minuteSelectTag()

model()

monthSelectTag()

namespace()

nestedProperties()

new()

obfuscateParam()

onlyProvides()

onMissingMethod()

package()

pagination()

paginationLinks()

passwordField()

passwordFieldTag()

patch()

pluginNames()

pluralize()

post()

primaryKey()

primaryKeys()

processAction()

processRequest()

properties()

property()

propertyIsBlank()

propertyIsPresent()

propertyNames()

protectedProperties()

protectsFromForgery()

provides()

put()

radioButton()

radioButtonTag()

redirectTo()

redoMigration()

reload()

renderNothing()

renderPartial()

renderText()

renderView()

renderWith()

resetCycle()

resource()

resources()

response()

root()

save()

scope()

secondSelectTag()

select()

selectTag()

sendEmail()

sendFile()

set()

setFilterChain()

setPagination()

setPrimaryKey()

setPrimaryKeys()

setProperties()

setResponse()

setTableNamePrefix()

setVerificationChain()

simpleFormat()

singularize()

startFormTag()

stripLinks()

stripTags()

styleSheetLinkTag()

submitTag()

sum()

table()

tableName()

textArea()

textAreaTag()

textField()

textFieldTag()

timeAgoInWords()

timeSelect()

timeSelectTags()

timeUntilInWords()

titleize()

toggle()

truncate()

update()

updateAll()

updateByKey()

updateOne()

updateProperty()

URLFor()

usesLayout()

valid()

validate()

validateOnCreate()

validateOnUpdate()

validatesConfirmationOf()

validatesExclusionOf()

validatesFormatOf()

validatesInclusionOf()

validatesLengthOf()

validatesNumericalityOf()

validatesPresenceOf()

validatesUniquenessOf()

validationTypeForProperty()

verificationChain()

verifies()

wildcard()

wordTruncate()

yearSelectTag()