cut and paste mistake
read the datagrid tag as
<mx:DataGrid id="dgContactList" editable="true"
dataProvider="{acContacts}" width="100%" height="95%">
--- In [email protected], "pateyog" <[EMAIL PROTECTED]> wrote:
>
> Pardon my ignorance. How can I do this with the following example:
> I want to use id as in the below given xml as the uid. Is this
> possible in the first place.
>
>
> My data is of the following form:
> <contacts>
> <contact id="1">
> <name>Peter</name>
> <address>XXXXXXXXXXXXXXXXX</application>
> <company>CompA</company>
> <status>Active</status>
> </contact>
> <contact id="2">
> <name>Jack</name>
> <address>XXXXXXXXXXXXXXXX</address>
> <company>CompB</company>
> <status>Pending Approval</status>
> </contact>
> </contacts>
>
> My mxml contains code like this
>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns = "*"
> layout="horizontal" creationComplete="srvHTTP.send();" >
>
> <mx:HTTPService id="srvHTTP" url="data/contact.xml"
> result="acContacts = new
> ArrayCollection(srvHTTP.lastResult.contacts.contact);"/>
>
> <mx:Canvas label="Contact List" width="100%" height="100%">
>
>
>
> <mx:DataGrid id="idC_DG_PTL" editable="true"
> dataProvider="{dataObjectPTL}" width="100%" height="95%"
> dragEnabled="true">
> <mx:columns>
> <mx:Array>
> <mx:DataGridColumn dataField="name"
> headerText="Name"/>
> <mx:DataGridColumn dataField="address"
> headerText="Address"/>
> <mx:DataGridColumn dataField="company"
> editable="false" headerText="Company"/>
> <mx:DataGridColumn dataField="status"
> editable="false" headerText="Status"/>
> </mx:Array>
> </mx:columns>
> </mx:DataGrid>
>
> </mx:Canvas>
> </mx:Application>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --- In [email protected], "Jeremy Lu" <wade.lu@> wrote:
> >
> > If your VO are bindable, chances are very high that you might not
> need to
> > implement the IUID interface, it will be automatically done.
> >
> >
> > Jeremy.
> >
> > On 7/31/06, Oriol Gual <oriol.gual@> wrote:
> > >
> > > I have done it in a VO using Cairngorm, I suppose it won't be very
> > > different to you:
> > >
> > > package com.example.vo {
> > >
> > > import mx.core.IUID;
> > >
> > > import com.adobe.cairngorm.vo.ValueObject ;
> > > [RemoteClass(alias="com.example.vo.ExampleVO")]
> > > [Bindable]
> > > public class ExampleVO implements ValueObject, IUID {
> > >
> > > public var dummyVar: int;
> > > public var anotherDummyVar : String;
> > >
> > > public var _uid:String;
> > >
> > > public function get uid():String
> > > {
> > > return _uid;
> > > }
> > >
> > > public function set uid(value:String):void
> > > {
> > > _uid = value;
> > > }
> > > }
> > > }
> > >
> > > Oriol.
> > >
> > > 2006/7/30, pateyog <pateyog@>:
> > > >
> > > > I am a newbie and was trying to understand how to use the iuid
> > > interface while using a datagrid that is being populated by a
> > > ArrayCollection fetching data from an xml using http service.
> > >
> > > Can any of you point me to an example
> > > Thanks
> > > -pateyog
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > > http://groups.yahoo.com/group/flexcoders/
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
--
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/