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
S
 safeEval, TrimPath. junctionUtil
 safeParseFloat, TrimPath. junctionUtil
 safeParseInt, TrimPath. junctionUtil
 save, Model
 scaffold(controllerFunc,modelName), TrimPath. junction
 select(objName,attrName,choices,htmlOptions)
 setConventionalAttributes(...), Model
 setLocale(localeStr), res
 setMapTreeValue, TrimPath. junctionUtil
 startFormTag(controllerName,actionName,objId,htmlOptions)
 startFormTagLocal(controllerName,actionName,objId,htmlOptions)
 stylesheetIncludeTag(stylesheetName)
 submitButton(name,value,htmlOptions)
 submitButtonLocal(name,value,htmlOptions)
 syncAllowedForTable, TrimPath. junctionUtil
 syncUp, TrimPath. junction
T
 t(str,defaultResult), res
 tableName(tableNameVal)
 tChoices(arr), res
 textArea(objName,attrName,htmlOptions)
 textField(objName,attrName,htmlOptions)
 toLocalDateString, TrimPath. junctionUtil
 toSQLDateString, TrimPath. junctionUtil
 toUrlParams, TrimPath. junctionUtil
 toUTCDateString, TrimPath. junctionUtil
 trim, TrimPath. junctionUtil
U
 update_attributes, Model
 updateAttributes, Model
 upperFirst, TrimPath. junctionUtil
 urlFor(...)
 urlForArgs(args)
 utcDateString(date,withTime), res
V
 valid, Model
 validatesFormatOf(attrName,regexp,msg,on)
 validatesInclusionOf(attrName,inArray,msg,on)
 validatesPresenceOf(attrName,msg,on)
A safer alternative to normal eval() that protects the caller’s scope.
safeParseFloat : function(str,
defaultValue)
A wrapper around parseFloat() that returns a defaultValue if the input string cannot be parsed.
safeParseInt : function(str,
defaultValue)
A wrapper around parseInt() that returns a defaultValue if the input string cannot be parsed.
modelInfo.func.prototype.save = function()
Saves a new or updated Model instance to the RDBMS.
scaffold : function(controllerFunc,
modelName)
Provides some simple Controller action methods for a given Model for increased developer productivity.
select : function(objName,
attrName,
choices,
htmlOptions)
Returns an html select tag string that represents a Model field.
modelInfo.func.prototype.setConventionalAttributes = function(skipVersion)
Sets the convention-over-configuration field attributes of the Model instance.
setLocale : function(localeStr)
Sets the locale string for the current response.
setMapTreeValue : function(mapTree,
path,
value)
Given a hierarchical map of maps (a tree of map objects), sets a leaf value in the tree given a path that looks like ‘key1[key2][key3]’.
Returns a form tag whose action URL is to the given controller/action.
Just like startFormTag(), but adds an onsubmit handler that invokes TrimPath.junctionClient.postForm().
Returns a stylesheet style or link tag, depending on the runtime environment.
Returns an html input/ submit tag.
Returns an html input/ submit tag, with an onclick handler that calls TrimPath.junctionClient.postForm().
syncAllowedForTable : function(tableName,
schema)
Returns whether a database table is a possible candidate for synchronization between client-side and server-side databases.
syncUp : function()
Requests an asynchronous synchronization of the local database with the server database.
t : function(str,
defaultResult)
Translate a static string based on the current response locale.
Tells junction the name of the table in the database that maps to the Model.
Translate an array of choice strings that is usually passed to the res.select() function.
Returns an html textarea tag string that represents a Model field.
Returns an html input/ text tag string that represents a Model field.
toLocalDateString : function(date,
withTime)
Formats a Date as either ‘YYYY/MM/DD’ or ‘YYYY/MM/DD hh:mm:ss’.
toSQLDateString : function(date)
Formats a Date as a database-friendly ISO-8601 ‘YYYY-MM-DD hh:mm:ssZ’ string, such as ‘2004-10-24 01:02:35Z’.
toUrlParams : function(map,
exceptMap)
Constructs a HTTP url query string from a map object.
toUTCDateString : function(date,
withTime)
Formats a Date as either ‘YYYY/MM/DD’ or ‘YYYY/MM/DD hh:mm:ss’.
trim : function(str)
Removes leading and trailing whitespace from a string.
An alias for the updateAttributes() method.
Updates several attributes of the modelInstance and saves.
upperFirst : function(str)
Capitalizes the first character in a string.
Returns a URL string.
Returns a URL string from the given args hash/map.
Similar to TrimPath.junctionUtil.toUTCDateString(), formats a Date as either ‘YYYY/MM/DD’ or ‘YYYY/MM/DD hh:mm:ss’.
An alias for the isValid() method.
Adds a field/column validation rule based on a regular expression.
Adds a field/column validation rule based an array of allowed values.
Adds a field/column validation rule checking for non-null.