I get the following error when trying to run one of Ben Forta's cfselect 
binding examples:

Attribute validation error for the CFSELECT tag.  
The value of the QUERY attribute is invalid. The 'Query' attribute must be 
defined if the 'Value', 'Display', or 'Group' attributes are defined.  
  
The error occurred in F:\inetpub\wwwroot\testbind\artform.cfm: line 10
 
8 :              value="mediaid"  
9 :              display="mediatype"
10 :              bindonload="true" /></td>
11 :     </tr>
12 :     <tr>

 
The display page is artform.cfm

<cfform>
 
 <table>
    <tr>
       <td>Select Media Type:</td>
       <td><cfselect name="mediaid"
             bind="cfc:art.getMedia()"
             value="mediaid"  
             display="mediatype"
             bindonload="true" /></td>
    </tr>
    <tr>
       <td>Select Art:</td>
       <td><cfselect name="artid"
             value="artid"
             display="artname"
             bind="cfc:art.getArt({mediaid})" /></td>
    </tr>
 </table>
 
 </cfform>  

the cfc in the same directory is

<cfcomponent output="false">

   <cfset THIS.dsn="cfartgallery">

   <!--- Get array of media types --->
   <cffunction name="getMedia" access="remote" returnType="query">
      <!--- Define variables --->
      <cfset var data="">

      <!--- Get data --->
      <cfquery name="data" datasource="#THIS.dsn#">
      SELECT mediaid, mediatype
      FROM media
      ORDER BY mediatype
      </cfquery>

      <!--- And return it --->
      <cfreturn data>
   </cffunction>

   <!--- Get art by media type --->
   <cffunction name="getArt" access="remote" returnType="query">
      <cfargument name="mediaid" type="numeric" required="true">

      <!--- Define variables --->
      <cfset var data="">

      <!--- Get data --->
      <cfquery name="data" datasource="#THIS.dsn#">
      SELECT artid, artname
      FROM art
      WHERE mediaid = #ARGUMENTS.mediaid#
      ORDER BY artname
      </cfquery>

      <!--- And return it --->
      <cfreturn data>
   </cffunction>

</cfcomponent>

can anyone tell me what I'm doing wrong?
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292745
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to