Having trouble with binding

Posted by Tam on Stack Overflow See other posts from Stack Overflow or by Tam
Published on 2010-03-30T00:03:11Z Indexed on 2010/03/30 3:03 UTC
Read the original article Hit count: 576

Filed under:
|
|

I'm not sure if I'm misunderstanding the binding in Flex. I'm using Cairngorm framework. I have the following component with code like:

        [Bindable]
        var _model:LalModelLocator = LalModelLocator.getInstance();
....
<s:DataGroup    dataProvider="{_model.friendsSearchResults}"
                     includeIn="find"
                     itemRenderer="com.lal.renderers.SingleFriendDisplayRenderer">
            <s:layout>
                <s:TileLayout orientation="columns"    requestedColumnCount="2" />
            </s:layout>         </s:DataGroup>

in the model locator:

[Bindable]
public var friendsSearchResults:ArrayCollection = new ArrayCollection();

Inside the item renderer there is a button that calls a command and inside the command results there is a line like this:

model.friendsSearchResults = friendsSearchResults;

Putting break points and stepping through the code I confirmed that this like gets called and the friendsSearchResults gets updated.

To my understanding if I update a bindable variable it should automatically re-render the s:DataGroup which has a dataProvider of that variable.

© Stack Overflow or respective owner

Related posts about flex

Related posts about cairngorm