Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF/Flex question

Status
Not open for further replies.

baserath

Technical User
Jan 25, 2002
6
US
I am having trouble getting a combo box to populate in a sample flex 1.5 environment.

Code to populate the combo boxis below:

<mx:ComboBox initialize="svcLinks.getCategories.send()" dataProvider="svcLinks.getCategories.result" width="125" id="cboCategory"/>

I have defined my webservices as:

<mx:WebService id="svcLinks" wsdl="com/linkdata.cfc?WSDL">
<mx:eek:peration name="getLinks" />
<mx:eek:peration name="getCategories" />
<mx:eek:peration name="addLink" result="svcLinks.getLinks.send()">
<mx:request>
<url>{txtURL.text}</url>
<description>{txtDescription.text}</description>
<category>{cboCategory.selectedItem.CATEGORY}</category>
</mx:request>
</mx:eek:peration>
</mx:WebService>
<mx:Binding source="query2tree(svcLinks.getLinks.result)" destination="treLinks.dataProvider"/>
<mx:Script source="query2tree.as"/>
<mx:Script source="linkfunc.as"/>



I am calling the cfc component below:

<cfcomponent>
<cffunction name="getLinks" returntype="query" access="remote" output="false">
<cfquery name="qryLinks" datasource="#request.dsn#" >
SELECT *
FROM Links
ORDER BY Category;
</cfquery>
<cfreturn qryLinks />
</cffunction>
<cffunction name="getCategories" returntype="query" access="remote" output="false">
<cfquery name="qryCategories" datasource="#request.dsn#">
SELECT DISTINCT Category
FROM Links
ORDER BY Category;
</cfquery>
<cfreturn qryCategories />
</cffunction>
<cffunction name="addLink" returntype="any" access="remote" output="true">
<cfargument name="url" type="string" required="true" />
<cfargument name="description" type="string" required="true" />
<cfargument name="category" type="string" required="true" />
<cfquery name="qryAddLink" datasource="#request.dsn#" >
INSERT INTO Links (URL, Description, Category)
VALUES ('#url#', '#description#', '#category#');
</cfquery>
</cffunction>
</cfcomponent>

I can get data from the first function in the component and the site seems to load well but when I click on the combo box nothing happens

Im sure it is a simple problem but I am having trouble tracking it down.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top