Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 add, ModelErrors
 add_to_base, ModelErrors
 addColumn(tableName,columnName,columnType)
 addIndex(tableName,columnNames,indexType,indexName)
 addToBase, ModelErrors
 ajax, TrimPath
B
 beforeFilter(controllerFunc,filterFunc), TrimPath. junction
 belongsTo(parentName,info)
 belongsToActive(parentName,info)
 build(attrs), Model
C
 clear, ModelErrors
 column(name,type)
 count, ModelErrors
 countActive(params), Model
 createStandardTable(tableName,...columns...)
 createTable(tableName,...columns...)
D
 dbExecute(sql,optParams), TrimPath. junction
 deactivate, Model
 decodeAngles, TrimPath. junctionUtil
 destroy, Model
 dropTable(tableName)
E
 encodeAngles, TrimPath. junctionUtil
 encodeQuotes, TrimPath. junctionUtil
 endFormTag
 errorMessagesFor(objName,options)
 errorMessagesOn(objName,attrName,...)
 errors, Model
 escape, TrimPath. junctionUtil
 escape(str)
 exceptionDetails, TrimPath. junctionUtil
F
 find, Model
 findActive(id,params), Model
 findAll(params), Model
 findBySql(sql), Model
 findFirst(params), Model
 formToReq
 full_messages, ModelErrors
 full_messages_on, ModelErrors
 fullMessages, ModelErrors
 fullMessagesOn, ModelErrors
G
 get
 getAsync
 getLocale, res
 getMapKeys, TrimPath. junctionUtil
H
 h(str)
 hasMany(childPluralName,info)
 hasManyActive(childPluralName,info)
 hiddenField(objName,attrName,htmlOptions)
I
 include(textPath)
 inputField(objName,attrName,inputType,htmlOptions)
 inputTag(name,value,inputType,htmlOptions)
 invalid_attributes, ModelErrors
 invalidAttributes, ModelErrors
 is_empty, ModelErrors
 is_invalid, ModelErrors
 is_new_instance, Model
 is_new_record, Model
 is_valid, Model
 isEmpty, ModelErrors
 isInvalid, ModelErrors
 isNewInstance, Model
 isNewRecord, Model
 isOnline, TrimPath. junction
 isValid, Model
J
 javascriptIncludeTag(scriptName)
 junctionHelpers(res), TrimPath
L
 leftZeroPad, TrimPath. junctionUtil
 linkTo(...)
 linkToArgs(linkText,args,htmlOptions)
 linkToLocal(...)
 localDateString(date,withTime), res
 lowerFirst, TrimPath. junctionUtil
M
 modelFor(modelName,func), TrimPath. junction
 modelInit(modelName,func), TrimPath. junction
N
 new_instance(attrs), Model
 newInstance(attrs), Model
O
 on, ModelErrors
 on_base, ModelErrors
 onBase, ModelErrors
 onBeforeSync, Model
P
 parseDateString, TrimPath. junctionUtil
 passwordField(objName,attrName,htmlOptions)
 pluralName(pluralNameVal)
 post
 postAsync
 postForm
R
 radioButton(objName,attrName,tagValue,htmlOptions)
 redirectTo(...), res
 redirectToAction(actionName,objId,args), res
 redirectToArgs(args), res
 removeIndex(tableName,indexName)
 renameTable(oldName,newName)
 render(...), res
 renderAction(actionName), res
 renderTemplate(templatePath), res
 renderText(text), res
ModelErrors.prototype.add = function(attrName,
msg)
Adds an error message that’s associated with a named property or field.
ModelErrors.prototype.add_to_base = function(msg)
Adds an error message assocated with the entire modelInstance.
Adds a column to a table in the database.
Adds an index to a table in the database.
An alias for the add_to_base() method.
Tries to service an Ajax call locally before sending a true, remote Ajax request.
Appends a filter function to the ‘before’ filter chain of a Controller.
Associates a child Model with a parent Model.
Similar to belongsTo(), but uses findActive() instead of find for the generated parent getter function.
An alias for Model.newInstance(attrs).
ModelErrors.prototype.clear = function()
Removes all the error messages held by this ModelErrors instance.
ddl.column = function()
A syntatic sugar helper function that creates a column definition array.
ModelErrors.prototype.count = function()
Returns the number of error messages stored in the ModelErrors instance.
Does a SELECT COUNT(*) query for active records.
Creates a database table with some standard columns that Junction needs to be able to synchronize the table.
Creates a table in the database.
dbExecute : function(sql,
optParams)
Executes a SQL query against the local application database.
modelInfo.func.prototype.deactivate = function()
Sets the active column of the model instance to 0.
decodeAngles : function(str)
Converts HTML entities (&lt; and &gt;) to < and >.
modelInfo.func.prototype.destroy = function()
Deletes the model record from the local RDBMS.
Drops a table the database.
encodeAngles : function(str)
Converts < and > characters to HTML entities (&lt; and &gt;).
encodeQuotes : function(str)
Backslashes single quotes (‘ becomes \’) and converts double quotes (“) to the &quot; HTML entity.
Returns an html /form close tag string.
Returns an html div string containing all the validation error messages on a Model instance.
Returns an html string of div’s for each validation error messages on a particular Model field.
modelInfo.func.prototype.errors = function()
Returns the ModelErrors object that holds validation error information.
escape : function(s)
Converts &, <, >, “ characters into HTML entity markup.
escape : function(str)
Converts &, <, >, “ characters into HTML entity markup.
exceptionDetails : function(e)
Extracts useful debugging information out of an exception Error object.
modelInfo.func.find = function(id,
params)
Queries the database for records of Model.
Like find(), but ensures that ‘active = 1’ is part of the query.
Equivalent to Model.find(‘all’, params).
Queries the database for Model instances using a full SQL query string.
Equivalent to Model.find(‘first’, params)
formToReq : function(formEl,
submitButtonName,
req)
Fills a req hash/map object with key/values from input controls in a form.
ModelErrors.prototype.full_messages = function()
Returns an Array of all error message strings.
ModelErrors.prototype.full_messages_on = function(attrName)
Returns an Array of error message strings associated with a given attrName.
An alias for the full_messages() method.
An alias for the full_messages_on() method.
get : function(controllerName,
actionName,
objId,
req)
Sends a GET request through the Junction system.
getAsync : function(controllerName,
actionName,
objId,
req,
callbacks)
Sends an asynchronous GET request to the client-side Junction system.
getLocale : function()
Returns the locale string for the current response.
getMapKeys : function(map,
optTestProperty)
Returns all the keys of an object or map.
An alias for the escape function.
Associates a Model (a ‘parent’) in a has-many relationship with a ‘child’ Model.
Similar to hasMany(), but uses findActive() instead of find() for the generated child getter function.
Returns an html input/ hidden tag string that represents a Model field.
include : function(textPath)
Returns the text content of a static code file.
Returns an html input/ tag string that represents a Model field.
Returns an html input/ tag string.
ModelErrors.prototype.invalid_attributes = function()
Returns the names of properties/fields that have validation errors.
An alias for the invalid_attributes() method.
ModelErrors.prototype.is_empty = function()
Returns whether there are any error messages stored in the ModelErrors instance.
ModelErrors.prototype.is_invalid = function(attrName)
Returns whether there are error messages associated with a particular property or field of a model instance.
An alias for the isNewRecord() method.
An alias for the isNewRecord() method.
An alias for the isValid() method.
An alias for the is_empty() method.
An alias for the is_invalid() method.
An alias for the isNewRecord() method.
Returns true if the record is a new, unsaved record.
isOnline : function()
Returns whether a client-side Junction environment is online (has connectivity to a server).
Runs the validations on the model instance.
Returns a script link or inline script tag, depending on the runtime environment.
TrimPath.junctionHelpers = function(res)
Fills and returns a hash/map object of standard View helper functions.
leftZeroPad : function(val,
minLength)
Adds leading zero’s (0’s) as a prefix to a number or string.
Returns a HTML A link string to the given controller/action.
Returns an A link tag string.
Returns a HTML A link to the given controller/action, with an onclick event handler that calls the client-side Junction system to process the request, if available.
Similar to TrimPath.junctionUtil.toLocalDateString(), formats a Date as either ‘YYYY/MM/DD’ or ‘YYYY/MM/DD hh:mm:ss’.
lowerFirst : function(str)
Uncapitalizes the first character in a string.
An alias for the modelInit function.
Tells the Junction system that a given function/constructor represents a Model object.
An alias for Model.newInstance(attrs)
Creates a new, unsaved instance of a Model.
ModelErrors.prototype.on = function(attrName)
Returns the error messages associated with a particular property or field of a model instance.
ModelErrors.prototype.on_base = function()
Returns the error messages that were associated with the entire model instance.
An alias for the on_base() method.
An optional callback function that’s called before client-side synchronization.
parseDateString : function(s)
Parses a string into a Date object, especially useful for handling the ISO-8601 date/time format generated by toSQLDateString().
Returns an html input/ password tag string that represents a Model field.
Tells junction the plural name of the Model.
post : function(controllerName,
actionName,
objId,
req)
Sends a POST request through the Junction system.
postAsync : function(controllerName,
actionName,
objId,
req,
callbacks)
Sends a POST request through the Junction system.
postForm : function(formEl,
controllerName,
actionName,
objId,
req,
submitButtonName)
Sends a POST request through the Junction system.
Returns an html input/ radio tag string that represents a Model field.
Sends a HTTP redirect response to the client.
Sends a HTTP redirect response to the client, targeting an action on the current controller.
Sends a HTTP redirect response to the client.
Removes an index from the database.
Renames a table in the database.
render : function(templateName)
Render a template.
Render a template belonging to the current Controller.
Render a template given a full template path.
Sets a string to be the result returned to the client.