# Accordion component Null reference

**URL:** https://forum.kirupa.com/t/accordion-component-null-reference/308478
**Category:** flash
**Created:** [April 23, 2010, 3:32pm UTC](https://forum.kirupa.com/t/accordion-component-null-reference/308478 "2010-04-23T15:32:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![benkyma](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@benkyma](https://forum.kirupa.com/u/benkyma)
#### Post date: [April 23, 2010, 3:32pm UTC](https://forum.kirupa.com/t/accordion-component-null-reference/308478/1 "2010-04-23T15:32:20Z")

</div>

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”\>

```
        &lt;mx:VBox label="EDITOR'S NOTES" fontSize="10" width="100%" &gt;
            &lt;mx:Text width="100%" id="editorsNotesCont" /&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox label="DETAILS" fontSize="10" width="100%"&gt;
            &lt;mx:Text width="100%" id="detailsCont"/&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox label="SIZE AND FIT" fontSize="10" width="100%"&gt;
            &lt;mx:Text width="100%" id="sizeAndFitCont"/&gt;
        &lt;/mx:VBox&gt;
        &lt;mx:VBox label="CHOOSE YOUR SIZE" fontSize="10" width="100%"&gt;
            &lt;mx:Text width="100%" id="chooseSizeCont"/&gt;
        &lt;/mx:VBox&gt;
    &lt;/mx:Accordion&gt;

```

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;
