Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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(pages242245) · UsedaDataGroupwithadatasettodisplayinformationwithanitemRenderer (pages 245246) · CreatedanitemRenderer(pages246253) · Learnedaboutvirtualization(pages253257) · Respondedtoauser'schoicefromalist(pages257259)