On 8/10/05, Tariq Ahmed <[EMAIL PROTECTED]> wrote:
> Got a simple model:
> <mx:Model id="sectionModel">
> <region revenue="1"/>
> <region revenue="2"/>
> <region revenue="3"/>
> <region revenue="4"/>
> </mx:Model>
>
> And I got a function that just hard code updates the values:
> function processCurrentItems()
> {
> sectionModel.region[0].revenue = 13;
> sectionModel.region[1].revenue = 14;
> sectionModel.region[2].revenue = 15;
> sectionModel.region[3].revenue = 16;
> }
>
> And then these two components displaying data:
> <mx:List dataProvider="{sectionModel.region}" labelField="revenue"/>
> <mx:Label text="{sectionModel.region[0].revenue}"/>
>
> Now the list should show 13,14,15,16 after the above function is called,
> and it does if called from the Application initialize call. But, if it's
> called as a result from a remoteObject call, the model is updated, but
> the List doesn't the change, however the Label does.
It's a case of the List not know that the model has changed. It needs
to get a modelChanged even or binding to fire.
You could do one of the following as the last thing in your processCurrentItems:
1. selectionModel.region.dispatchEvent({type: "modelChanged"});
2. selectionModel.region = selectionModel.region; // I think this
triggers binding
Manish
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hael5vt/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123682697/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/