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
peration name="getLinks" />
<mx
peration name="getCategories" />
<mx
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
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
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
<mx
<mx
<mx:request>
<url>{txtURL.text}</url>
<description>{txtDescription.text}</description>
<category>{cboCategory.selectedItem.CATEGORY}</category>
</mx:request>
</mx
</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