EasyCFM.COM ColdFusion Forums / Flex Development / tilelist problem

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: tilelist problem

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

zionist
01-15-2009 @ 3:19 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 94
Joined: Feb 2007

hi fellow coders, i have a problem with my code. everything looks fine to me but for some reason i cant get the result i expect. i have a tile list which is populated by an "dataAr" Arraycollection. the tile list has an item renderer that shows image and text which all come from a database. the text show up fine but the imgaes will not show. can someone please help me. here is my code.

"cfc function that pulls data from db"

<!--- 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/' + image AS profilePic,
                         lat, lng, description, 'http://localhost:8500/iestate/images/video/' + tour AS video
          FROM homes          
          </cfquery>
          <cfreturn results>
     </cffunction>

"tilelist iteam renderer image source in hbox"



     Image source="{'../assets/homeprofile_pics/' + data.profilePic}"

     
     Label text="{data.type}" fontWeight="bold"
     Label text="{cf.format(data.price)}"
     
     

"dataAr Arraycollection"

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);
               }

Scarecrow
04-05-2009 @ 6:53 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 109
Joined: Oct 2004

First, I'm not really sure why you want to query the db then do a QoQ, this could have been done in the single query.

Your problem is that in the QoQ you set the path to the image, but in the itemrenderer you append the relative path as well.

Ken

www.scarecrowapplications.com


Website Designed and Developed by Pablo Varando.