A typed value object is basically an object that matches to some data
entity you are working with. You create a class to define the entity,
give it properites (that are bindable) and then put instances of that
class into the ArrayCollection instead of non descript Objects

ie

class BookVO {
   [Bindable]
   public var title: String;

   [Bindable]
   public var author: String;

   [Bindable]
   public var ISBN: String;

   public function BookVO():void {

   }
}

... and then loop through the results from the webservice and for each
item, create a new BookVO, fill in the properties and add that to the
ArrayCollection. I imagine you are probably currently doing something
similiar to 

var book = new Object();
book.author = xmlNode.ItemAttributes.author;
book.title =  xmlNode.ItemAttributes.title;
book.ISBN =  xmlNode.ItemAttributes.ISBN;

This is certainly very easy to start with, but in the long run causes
more headaches for a variety of reasons.

By using typed objects with bindable properties, it leverages the Flex
components awareness of changes in those objects, basically the
components listen to the objects for changes, which means you don't
have to manually refresh things when changes happen.

Derrick Grigg
-------------
www.dgrigg.com

--- In [email protected], "livinginswitzerland"
<[EMAIL PROTECTED]> wrote:
>
> Thanks Derrick...
> 
> I had tried invalidateDisplay list, but not invalidateList..which did 
> it.  interesting.  when you say typed value objects...can you elaborate 
> on that?  I am doing some 'non standard' things, and all of my data is 
> read into an ArrayCollection via a web service, but i'm not using XML 
> but text instead.  Curious if what you are saying regarding typed value 
> objects is something i'm bumping up against.
> 
> thanks again!
> 
> -rick
> 
> --- In [email protected], "Derrick Grigg" <dgrigg@> wrote:
> >
> > I think you can use the 'invalidateDisplayList()'  or possibly 
> > the 'invalidateList()' to refresh your datagrid.
> > 
> > Alternatively, if you use typed value objects in the dataProvider any 
> > changes to those, should automatically be reflected (and viewed) in 
> > the DataGrid if you are using databinding.
> > 
> > Derrick Grigg
> > --------
> > www.dgrigg.com
> >
>






--
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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/
 


Reply via email to