I didn't see the code for modelLocator. It looks like it might be a class, in which case it must specify a changeEvent for the activities property otherwise when it changes, binding won't know it changed and won't update the TileList.
--- In flexcoders@yahoogroups.com, "Shahnavaz Alware" <[EMAIL PROTECTED]> wrote: > Hi All, > > > > I am implementing the TileList with CellRenderer > > <mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml > > initialize=" loadComplete()"/> > > > > <mx:Script> > > <![CDATA[ > > > > import com.test.model.ModelLocator; > > import com.test.dto.ActivityDTO; > > import org.nevis.cairngorm.control.EventBroadcaster; > > import com.test.control.SfmController; > > > > > public var activities : Array; > > > > > public var activity : ActivityDTO; > > > > > private function loadComplete() : Void { > > > > > EventBroadcaster.getInstance().broadcastEvent > > ( > SfmController.EVENT_GET_ACTIVITIES_WORK_QUEUE ); > > > } > > > > > ]]> > > </mx:Script> > > > > <mx:TileList id="tileListComp" width="100%" height="100%" > > dataProvider="{ ModelLocator.activities }" > > itemWidth="300" itemHeight="100" > > > cellRenderer="com.test.view.activityview.ActivityDetailThumbnail" > > > change="activityWorkQueueListViewHelper.updateSelectedActivity( event )/> > > > > > > > > CellRenderer > > > > import com.hmssoftware.sfm.dto.ActivityDTO; > > import com.hmssoftware.sfm.dto.DeliverableDTO; > > import com.hmssoftware.sfm.model.ModelLocator; > > > public var activity : ActivityDTO; > > public var deliverable : DeliverableDTO; > > > > public function setValue( str : String, item : > Object ) > > { > > > > activity = ActivityDTO( item ); // This > is undefined > > mx.core.Application.alert( > "activity.activityId: " + activity.activityId );// Resulting in > "activity.activityId: Undefined" ?????????????? > > > > } > > > > I am unsing Cairngorm 0.99. In my onResult() of command when I check for > data ModelLocator.activities its valid. > > But the TileList dataprovider when initialized is undefined. I guess I need > some sequence which will help me to initialize CellRenderer > > After the onResult() where I am assigning event.result to > "ModelLocator.activities". Thanks in advance for any suggestion or help. > > > > Thanks, > > > > Shahn -- 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/