Whatever message this page gives is out now! Go check it out!
| Attribute | Tags | Supported formats |
autosuggest | cfinput type="text" | 1, 2, 3 |
bind | cfdiv , cfinput , cftextarea | 1, 2, 3, 5 |
bind | cfajaxproxy , cfgrid , cfselect , cfsprydataset , cftreeitem | 1, 2, 3 |
onChange | cfgrid | 1, 2, 3 |
source | cflayoutarea , cfpod , cfwindow | 4 |
bind="cfc:myapp.bookorder.getChoices({book})" source="/myApp/innerSource/cityWindow.cfm?cityname={inputForm:city} |
functionName = function(arguments) {function body} |
function functionName (arguments) {function body} |
bind="cfc:myapplication.bookSearch.getStores({form1:bookTitle})" |
{[formName:]controlName[.attributeName][@event]} {SpryDataSetName.fieldName} |
To include a literal brace character in a bind expression, escape the character with a backslash, as {, }. |
bind="cfc:myapp.bookorder.getChoices({inputForm:book})" |
bind="cfc:myapp.bookorder.useStatus({myForm:approved.checked@click}) |
bind="cfc:myapp.bookorder.getChoices({inputForm:book@mousedown})" |
bind="cfc:books.getinfo({iForm:book}, {iForm:author@none})" |
bind="cfc:mycfc.myfunction(arg1={myform:myfield1},arg2={myform:myfield2})" |
<cfcomponent> <cfset this.name = "cfcoutsidewebroot"> <cfset this.sessionmanagement = true> <Cfset mappingname = "/mycfcs"> <Cfset mappingpath = "c:\components\"> <cfset this.mappings[mappingname] = mappingpath> </cfcomponent> |
<cfcomponent> <cfscript> remote any function getEmployees(page,pageSize,gridsortcolumn="EMP_ID",gridsortdirection="ASC"){ var startRow = (page-1)*pageSize; var endRow = page*pageSize; if(!isdefined("arguments.gridsortcolumn") or isdefined("arguments.gridsortcolumn") and trim(arguments.gridsortcolumn) eq "") gridsortcolumn = "EMP_ID"; if(!isdefined("arguments.gridsortdirection") or isdefined("arguments.gridsortdirection") and arguments.gridsortdirection eq "") gridsortdirection = "ASC"; var mysql = "SELECT Emp_ID, FirstName, EMail, Department FROM Employees"; if(isdefined("arguments.gridsortcolumn") and arguments.gridsortcolumn neq "") mysql = mysql & " ORDER BY " & gridsortcolumn; if(isdefined("arguments.gridsortdirection") and arguments.gridsortdirection neq "") mysql = mysql & " " & gridsortdirection ; rs1 = new query(name="team", datasource="cfdocexamples", sql=mysql).execute(); return QueryConvertForGrid(rs1.getResult(), page, pageSize); } remote any function editEmployees(gridaction,gridrow,gridchanged){ writelog("edit employee info"); } </cfscript> </cfcomponent> |
<cfform> <cfgrid format="html" name="grid01" pagesize=10 title="Employee database" bind="cfc:mycfcs.employee.getEmployees({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})" onChange="cfc:mycfcs. employee.editEmployees({cfgridaction},{cfgridrow},{cfgridchanged})"> <cfgridcolumn name="Emp_ID" display=false header="ID" /> <cfgridcolumn name="FirstName" display=true header="First Name"/> <cfgridcolumn name="Email" display=true header="Email"/> <cfgridcolumn name="Department" display=true header="Department" /> </cfgrid> </cfform> |
<html> <head> </head> <body> <cfform name="mycfform"> First Name: <cfinput type="text" name="firstname" value=""><br> Last Name: <cfinput type="text" name="lastname" value=""><br> Domain: <cfinput type="text" name="domain" value=""><br> E-mail: <cfinput type="text" name="email1" size="30" bind="{firstname}.{lastname}@{domain}"> </cfform> </body> </html> |
<html> <head> </head> <body> <cfform name="myform"> Pick one: <cfinput id="pickers1" name="pickone" type="radio" value="Apples"> <label for="pickers1">Apples</label> <cfinput id="pickers2" name="pickone" type="radio" value="Oranges"> <label for="pickers2">Oranges</label> <cfinput id="pickers3" name="pickone" type="radio" value="Mangoes"> <label for="pickers3">Mangoes</label> <br> <cfinput name="pickone-selected" bind="{pickone}"><br /> <br /> Pick as many as you like: <cfinput id="pickers4" name="pickmany" type="checkbox" value="Apples"> <label for="pickers4">Apples</label> <cfinput id="pickers5" name="pickmany" type="checkbox" value="Oranges"> <label for="pickers5">Oranges</label> <cfinput id="pickers6" name="pickmany" type="checkbox" value="Mangoes"> <label for="pickers6">Mangoes</label> <br/> <cfinput name="pickmany-selected" bind="{pickmany}"><br /> </cfform> </body> </html> |
<html> <head> </head> <body> <cfform name="mycfform"> First Name: <cfinput type="text" name="firstname" value=""><br> Last Name: <cfinput type="text" name="lastname" value=""><br> Domain: <cfinput type="text" name="domain" value=""><br> E-mail: <cfinput type="text" name="email" bind="cfc:bindFcns.getEmailId({firstname@keyup},{lastname@keyup}, {domain@keyup})"> </cfform> </body> </html> |
<cfcomponent> <cffunction name="getEmailId" access="remote"> <cfargument name="firstname"> <cfargument name="lastname"> <cfargument name="domain"> <cfreturn "#left(arguments.firstname,1)#.#arguments.lastname#@#lcase(arguments.domain)#"> </cffunction> </cfcomponent> |
<cfajaxproxybind="cfc:mycfc.deleteRow({deletebutton@click}, {mygrid.id@none}"onSuccess="ColdFusion.Grid.refresh(mygrid, true)"> ... <cfinput type="button" name="deletebutton"> <cfgrid name="mygrid" bind="mycfc.update({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdirection})> |
<html> <head> <script language="javascript"> function test(x,y){ return "Hello, " + x + "!"; } function callbackHandler(result){ alert("Bind expression evaluated. Result: \n" + result); } </script> <cfajaxproxy bind="javascript:test({input1@none},{button1@click})" onSuccess="callbackHandler"> </head> <body> <cfform name="mycfform"> <cfinput type="text" value="" name="input1" size="30"> <cfinput type="button" name="button1" value="Submit"> </cfform> </body> </html> |