Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Lesson 10. Using DataGroups and Lists > What You Have Learned - Pg. 259

What You Have Learned 259 Thiswillcreateamethodnamed list1_changeHandler() foryou,whichacceptsanargu- mentnamed event ,oftype IndexChangeEvent .Thismethodwillautomaticallybesetas thechangehandlerforyourlist. protected function list1_changeHandler(event:IndexChangeEvent):void { // TODO Auto-generated method stub } 3 Replacethe // TODO auto-generatedmethodstubofthe list1_changeHandler() witha calltothe filterCollection() methodoftheproductService,passinginthe id ofthe selecteditemfromthelist( event.target.selectedItem.categoryID ). protected function list1_changeHandler(event:IndexChangeEvent):void { productService.filterCollection( event.target.selectedItem.categoryID ); } 4 Saveandruntheapplication. Now,asyouselectproductsfromthetopcategorylist,theproductsdisplayedin ShoppingViewareupdatedaccordingly. What You Have Learned In this lesson, you have: · PopulatedaListcontrolwithadataset(pages242­245) · UsedaDataGroupwithadatasettodisplayinformationwithanitemRenderer (pages 245­246) · CreatedanitemRenderer(pages246­253) · Learnedaboutvirtualization(pages253­257) · Respondedtoauser'schoicefromalist(pages257­259)