I’ve got an mx accordion component that I want to populate at runtime. However, the first box will populate fine, but all the others return null reference so I can’t access them. Does this have something to do with which one is currently selected? How can I get around this?
I’m creating my accordion:
<mx:Accordion x=“398” y=“207” width=“331” height=“250” alpha=“1.0” borderStyle=“solid” borderThickness=“0” cornerRadius=“10” fontFamily=“Arial” color=“#000000”>
<mx:VBox label="EDITOR'S NOTES" fontSize="10" width="100%" >
<mx:Text width="100%" id="editorsNotesCont" />
</mx:VBox>
<mx:VBox label="DETAILS" fontSize="10" width="100%">
<mx:Text width="100%" id="detailsCont"/>
</mx:VBox>
<mx:VBox label="SIZE AND FIT" fontSize="10" width="100%">
<mx:Text width="100%" id="sizeAndFitCont"/>
</mx:VBox>
<mx:VBox label="CHOOSE YOUR SIZE" fontSize="10" width="100%">
<mx:Text width="100%" id="chooseSizeCont"/>
</mx:VBox>
</mx:Accordion>
and populating from my parent class:
var product:ProductVO = e.product;
prodPage.DesignerTextField.htmlText = product.designer;
prodPage.TitleTextField.htmlText = product.title;
prodPage.PriceTextField.htmlText = product.price;
prodPage.ProductImageCont.source = product.imageUrls[3];
prodPage.editorsNotesCont.htmlText = product.editorsNotes;
//(fails here)
prodPage.detailsCont.htmlText = product.details;
prodPage.sizeAndFitCont.htmlText = product.sizeAndFit;