I am working on my transaction app, and I have run into an error that I
cant figure out. In my cfc I am returning a struct that holds all my
data that I am trying to populate my flex form inputs with. The cfc is
working correctly, I know this because I can get a proper out put when I
test the function I am working with, however when I test it with my flex
code I get this error.
Any help with this would be greatly appreciated.
ReferenceError: Error #1069: Property firstName not found on String and
there is no default value.
at
components.views.contacts::viewSearchVendor/::VendorManager_Vendor_Displ\
ay_Result()
at
components.views.contacts::viewSearchVendor/__vendorDG_doubleClick()
Here is my as code I am using to call my cfc function. This function is
called when a user dbl clicks a record in my data grid.
//*****************VENDOR POPULATE
START***********************************
// CALL POPULATE EDIT VENDOR
private function VendorManager_Vendor_Display(UUID){
VendorManager.Vendor_Display(UUID)
}
// HANDLE POPULATE EDIT VENDOR RESULTS
private function
VendorManager_Vendor_Display_Result(result):void{
parentApplication.mainDisplay.vven.firstName.text =
result.firstName;
parentApplication.mainDisplay.vven.lastName.text =
result.lastName;
parentApplication.mainDisplay.vven.compName.text =
result.compName;
parentApplication.mainDisplay.vven.address.text =
result.addrss;
parentApplication.mainDisplay.vven.city.text = result.city;
parentApplication.mainDisplay.vven.state.text =
result.state;
parentApplication.mainDisplay.vven.zip.text = result.zip;
parentApplication.mainDisplay.vven.hPhone.text =
result.hPhone;
parentApplication.mainDisplay.vven.wPhone.text =
result.wPhone;
parentApplication.mainDisplay.vven.mPhone.text =
result.mPhone;
parentApplication.mainDisplay.vven.fax.text = result.fax;
parentApplication.mainDisplay.vven.email.text =
result.email;
parentApplication.mainDisplay.vven.url.text = result.url;
parentApplication.mainDisplay.vven.uuid.text = result.uuid;
for (var i = 0;i < vendorTypeDP.length; i++)
{
if (vendorTypeDP[i].data == result.type)
{
parentApplication.mainDisplay.vven.type.selectedIndex =
i;
}
}
}
// HANDLE POPULTAE EDIT VENDOR ERRORS
private function
VendorManager_Vendor_Display_Fault(event:FaultEvent):void{
Alert.show("Test Error","Program Error");
}
//*****************VENDOR POPULATE
END*************************************
Here is my datagrid.
<mx:DataGrid x="240" y="40" id="vendorDG"
doubleClickEnabled="true"
doubleClick="VendorManager_Vendor_Display_Result(vendorDG.selectedItem.F\
LD_VENDOR_UID)" width="80%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Name"
dataField="FLD_VENDOR_FULLNAME"/>
<mx:DataGridColumn headerText="Company"
dataField="FLD_VENDOR_COMPANYNAME"/>
<mx:DataGridColumn headerText="Phone"
dataField="FLD_VENDOR_WORKPHONE"/>
<mx:DataGridColumn headerText="Fax"
dataField="FLD_VENDOR_FAX"/>
<mx:DataGridColumn dataField="FLD_VENDOR_UID"/>
</mx:columns>
</mx:DataGrid>
Here is my CFC function code.
<cffunction name="Vendor_Display" access="remote" output="false"
returntype="struct" >
<cfargument name="UUID" required="no" type="string" />
<cfquery name="VendorDisplayQry"
datasource="#application.dsn#">
select * from tbl_smartPanel_vendors
where fld_vendor_uid = <cfqueryparam
cfsqltype="cf_sql_varchar" value="#arguments.UUID#" />
</cfquery>
<cfset VendorInfo = structNew()>
<cfscript>
VendorInfo['firstName'] =
"#VendorDisplayQry.fld_vendor_firstname#";
VendorInfo['lastName'] =
"#VendorDisplayQry.fld_vendor_lastname#";
VendorInfo['compName'] =
"#VendorDisplayQry.fld_vendor_companyname#";
VendorInfo['address'] =
"#VendorDisplayQry.fld_vendor_address#";
VendorInfo['city'] =
"#VendorDisplayQry.fld_vendor_city#";
VendorInfo['state'] =
"#VendorDisplayQry.fld_vendor_state#";
VendorInfo['zip'] =
"#VendorDisplayQry.fld_vendor_zip#";
VendorInfo['hPhone'] =
"#VendorDisplayQry.fld_vendor_homephone#";
VendorInfo['wPhone'] =
"#VendorDisplayQry.fld_vendor_workphone#";
VendorInfo['mPhone'] =
"#VendorDisplayQry.fld_vendor_mobilephone#";
VendorInfo['fax'] =
"#VendorDisplayQry.fld_vendor_fax#";
VendorInfo['email'] =
"#VendorDisplayQry.fld_vendor_email#";
VendorInfo['url'] =
"#VendorDisplayQry.fld_vendor_url#";
VendorInfo['type'] =
"#VendorDisplayQry.fld_vendor_type#";
VendorInfo['uuid'] =
"#VendorDisplayQry.fld_vendor_UID#";
</cfscript>
<cfreturn VendorInfo />
</cffunction>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups. Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/