RE: [flexcoders] Re: tilelist itemrender problem

2009-01-16 Thread Tracy Spratt
Hard code a full url as a test.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of johndoematrix
Sent: Friday, January 16, 2009 3:26 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: tilelist itemrender problem

 

hi i have tried to debug the application but failed to find what the
problem is the other data is pulled from the database well but the
images are not. in all honesty i have tried over and over again bt
failed please help me. once again i will post my cfc.

cfc

!--- Get Homes ---
cffunction name=load output=false access=remote
returntype=query
cfargument name=ctry_id required=true type=numeric default=0
cfset var homes= 
cfset var result=  
cfquery name=homes datasource=realestate
select id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, image, lat, lng, description, tour

FROM homes 
WHERE ctryid_home = cfqueryparam value=#arguments.ctry_id#
cfsqltype=cf_sql_integer / 
/cfquery
cfquery dbtype=query name=results
select id, ctryid_home, city, location, price, type, 
square_feet, date_listed, bedrooms, bathrooms, status, 
pool, backyard, closets, garage, sale, 
rent, 'http://localhost:8500/IESTATE_V1/assets/homeprofile_pics/
http://localhost:8500/IESTATE_V1/assets/homeprofile_pics/ '
+ image AS profilePic,
lat, lng, description,
'http://localhost:8500/iestate/images/video/
http://localhost:8500/iestate/images/video/ ' + tour AS video
FROM homes 
/cfquery
cfreturn results
/cffunction

item renderer

?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
xmlns:reflection=as_logic.*
mx:CurrencyFormatter id=cf/

mx:Image source={'../assets/homeprofile_pics/' + data.profilePic}/
mx:VBox
mx:Label text={data.type} fontWeight=bold/
mx:Label text={cf.format(data.price)}/
/mx:VBox 
/mx:HBox

by the way i use the same arraycollection for the tilelist and
datagrid and all data is pulled out except the images. here is my
arraycollection

dataAr

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{
//var dataAry:Array = event.result as Array ;
//dataAr = new ArrayCollection( (dataAry as ArrayCollection).source);
dataAr = new ArrayCollection( (event.result as
ArrayCollection).source);
}

 



RE: [flexcoders] Re: tilelist itemrender problem

2009-01-09 Thread Kenneth Sutherland
What is the event.result? you need to stick a breakpoint when your
displayResult function is called and see what is being returned and
change that into an arraycollection.  You're line of code is effectively
saying that event.result is an arraycollection which I doubt (but I do
not know what CF can do).

 

Debug it and that will show you the answer, you need to see what's come
back. 

 

Kenneth.

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of johndoematrix
Sent: 09 January 2009 10:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: tilelist itemrender problem

 

when i use the hardcode relative link it works, so i guess the data
return from the cfc is wrong. bt thats odd the query seems to be
correct. may be its something to do with my arraycollection. please
take a look at the array collection and see if there's something wrong.

dataAr

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{
//var dataAry:Array = event.result as Array ;
//dataAr = new ArrayCollection( (dataAry as ArrayCollection).source);
dataAr = new ArrayCollection( (event.result as
ArrayCollection).source); 
}

remoteobj call

mx:RemoteObject id=homeSvc destination=ColdFusion
source=test.cfcs.homes1 showBusyCursor=true
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=load result=displayResult(event) / 

/mx:RemoteObject

 

Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---