--- In flexcoders@yahoogroups.com, "chefbrittison" <britton.j...@...> wrote:
>
> I have a panel which is being created dynamically within a sidebar depending 
> on the context of the main display area.  When the panel is added to the 
> display list, the bindings don't appear to fire correctly.  In this case, I 
> have a mx:List that is bound to an arraycollection that doesnt work.  Any 
> idea what is causing this or what I can do to fix it.  Calling the 
> executeBindings() method on the bound component upon creationComplete seems 
> to work Ok for lists but fails when a mx:Tree is contained within the panel.
> 
> Here's my panel code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <CollapsiblePanel xmlns:mx="http://www.adobe.com/2006/mxml";
>     width="100%" height="100%" 
>     title="Query Variables" 
>     creationComplete="handleCreationComplete()">
>       
>       <mx:Script>
>               <![CDATA[
>                       import 
> com.app.view.editor.tablelayout.view.stub.VariableElementStub;
>                       import 
> com.app.view.editor.tablelayout.view.stub.QueryVariableStub;
>                       import com.app.view.editor.api.query.ViewQueryVariable;
>                       import mx.collections.ArrayCollection;
> 
>             [Bindable]
>             private var _queryVariables:ArrayCollection;
>             
>             public static const PANEL_ID:String = "variableListPanel";
>             
>             public function get panelId():String {
>                 return PANEL_ID;
>             }
>                         
>             public function set queryVariables(value:ArrayCollection):void {
>               this._queryVariables = value;
>             }
> 
>     <mx:List id="variableList"
>         width="100%" 
>         alternatingItemColors="[#FFFFFF, #F1F1F1]"
>         dataProvider="{listItems}" 
>         labelField="label"
>         iconField="icon"
>         dragEnabled="true" /> 
>       
> </CollapsiblePanel>
>

I'd be surprised if this compiles, since the CollapsiblePanel tag contains a 
reference to a function, handleCreationComplete(), which does not appear in 
your (malformed) Script tag.  Does that function contain anything that 
populates listItems (which I don't see a declaration for)?  If not, maybe you 
should try binding to _queryVariables, which is the only ListCollectionView I 
see getting populated here.

HTH;

Amy

Reply via email to