tracker issue : CF-3913478

select a category, or use search below
(searches all categories and all time range)
Title:

cfgrid: cfc/js bind does not work.

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / ext-user (Piyush Kumar Nayak)

Created: 12/21/2014

Components: AJAX, UI Components

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: 11.0.03.292632 /

Priority/Frequency: Critical / Most users will encounter

Locale/System: English / Mac 10 All,Win XP All

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_probably_fixed on July 23, 2017 using build 2016.0.01.298513
Problem:
cfgrid: cfc/js bind does not work.
related bug: 3909574

Method:
observed with cf-main build 11.0.03.292632 / Win 7x64
<cfset variables.gridargs = {
	bindOnLoad=true,
	bind="cfc:data_util.getEmployees({txt_id},{cfgridpage},{cfgridpagesize},{txt_name},{cfgridsortcolumn},{cfgridsortdirection})"}>
<cfform name="grdform" id="grdform">
	<cfgrid  format="html" name="grid01" attributeCollection="#variables.gridargs#" > 
		<cfgridcolumn name="Emp_ID" display="true" header="Emp ID" >
		<cfgridcolumn name="FirstName" display="true" header="First Name">		
		<cfgridcolumn name="LastName" display="true" header="Last Name">
		<cfgridcolumn name="Email" display="true" header="Email">
		<cfgridcolumn name="Department" display="true" header="Department">				
	</cfgrid>
	<br>
</cfform>

<!------------------------ data-util.cfc ----------------------------->
<cfcomponent>
    <cffunction name="getData" access="remote" output="false">    
        <cfargument name="page">
        <cfargument name="pageSize">
    	<cfargument name="gridsortcolumn">
    	<cfargument name="gridstartdirection">
        
        <cfset query = "SELECT Emp_ID, FirstName, LastName, EMail FROM Employees"> 
        <cfif gridsortcolumn NEQ ""> 
            <cfset query = query & " ORDER BY #gridsortcolumn# #gridstartdirection#"> 
        </cfif>
       
        <cfquery name="team" datasource="ajax"> 
            <cfoutput>#query#</cfoutput> 
        </cfquery>
        
        <cfreturn QueryConvertForGrid(team, page, pageSize)>
    </cffunction>
</cfcomponent>

Result:
Attribute validation error for tag CFGRID.
It requires the attribute(s): NAME.
 
The error occurred in C:/inetpub/cf11/foo/grid-cfc-bind.cfm: line 6
5 : <cfform name="grdform" id="grdform">
6 : 	<cfgrid  format="html" name="grid01" attributeCollection="#variables.gridargs#" > 

Stack Trace
at cfgrid2dcfc2dbind2ecfm1672153016.runPage(C:/inetpub/cf11/foo/grid-cfc-bind.cfm:6) 

coldfusion.tagext.validation.RequiredAttributesException: Attribute validation error for tag CFGRID.
	at coldfusion.tagext.validation.TagAttrConfiguration.validate(TagAttrConfiguration.java:203)
	at coldfusion.tagext.validation.TagAttrConfiguration.validate(TagAttrConfiguration.java:167)
	at coldfusion.tagext.validation.CFMLTagValidator.validateAttrConfiguration(CFMLTagValidator.java:202)
	at coldfusion.tagext.GenericTag._setArguments(GenericTag.java:478)
	at cfgrid2dcfc2dbind2ecfm1672153016.runPage(C:\inetpub\cf11\foo\grid-cfc-bind.cfm:6)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:251)
	at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:496)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3913478

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

Hi Adobe, What exactly was the issue, and what was fixed? The code in the description doesn't make any sense. It's not a self-contained repro case and is referencing undefined variables. Noting this ticket is listed as being fixed in CF2016's list of Issues Fixed. But it is unclear, here, as to what the issue and fix were. Thanks! -Aaron
Comment by Aaron N.
9229 | July 23, 2017 07:27:35 AM GMT