Hi,
Maybe you left it out in your example, but do
you have the DataGridColumn tags? Like so:
<mx:DataGrid width="436"
height="100%">
<mx:dataProvider> {person.phones} </mx:dataProvider>
<mx:columns>
<mx:Array>
<mx:DataGridColumn headerText="number" width="125" labelFunction="zip"/>
<mx:DataGridColumn headerText="info" width="125" columnName="name1" />
<mx:DataGridColumn headerText="type" columnName="type" />
</mx:Array>
</mx:columns>
</mx:DataGrid> Perhaps you should show us the piece of code that sets
the dataProvider of the DataGrid. I think the problem lies
there. Dimitrios "Jimmy" Gianninas
RIA Developer
Optimal Payments Inc.
From: Christoph Guse [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 08, 2005 1:36 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] complex Remote Objects I still have the problem with my complex Remote Objects. Here is some code and other stuff: Output: ![]() Implementation in MXML: <mx:DataGrid width="436" height="100%"> <mx:dataProvider> {person.phones} </mx:dataProvider> </mx:DataGrid> Input in person from remote method: Info: Serializing response (Message #0 targetURI=/7/onResult, responseURI=null) (Typed Object #0 'ogo.vo.OgoPersonVO') addresses = (Array #1) [0] = (Typed Object #2 'ogo.vo.OgoAdressVO') country = "Deutschland" type = "location" street = "Albertus-Magnus-Weg 16" name2 = "Standortadresse" _remoteClass = "ogo.vo.OgoAdressVO" state = "NRW" name3 = "name3" zip = "48565" name1 = "Henning Guse" city = "Steinfurt" id = "skyrix://renner.flex/default/10710" [1] = (Typed Object #3 'ogo.vo.OgoAdressVO') country = "Deutschland" type = "private" street = "Albertus-Magnus-Weg 16" name2 = "Privatadresse" _remoteClass = "ogo.vo.OgoAdressVO" state = "NRW" name3 = "name3" zip = "48565" name1 = "Henning Guse" city = "Steinfurt" id = "skyrix://renner.flex/default/10690" [2] = (Typed Object #4 'ogo.vo.OgoAdressVO') country = "Deutschland" type = "mailing" street = "Albertus-Magnus-Weg 16" name2 = "Postadresse" _remoteClass = "ogo.vo.OgoAdressVO" state = "NRW" name3 = "name3" zip = "48565" name1 = "Henning Guse" city = "Steinfurt" id = "skyrix://renner.flex/default/10700" objectVersion = 32.0 isComplete = true jobTitle = "Vater" login = "OGo10610" _remoteClass = "ogo.vo.OgoPersonVO" lastChanged = Sat May 28 14:04:04 CEST 2005 salutation = "06_geehrt_herr" comment = "hier kommt die Bemerkung rein" id = "skyrix://renner.flex/default/10610" vorname = "Henning" phones = (Array #5) [0] = (Typed Object #6 'ogo.vo.OgoPhoneVO') info = "privat" telephoneId = 10770.0 type = "01_tel" _remoteClass = "ogo.vo.OgoPhoneVO" number = "02552-996021" [1] = (Typed Object #7 'ogo.vo.OgoPhoneVO') info = "auch privat" telephoneId = 10740.0 type = "02_tel" _remoteClass = "ogo.vo.OgoPhoneVO" number = "02552-996023" [2] = (Typed Object #8 'ogo.vo.OgoPhoneVO') info = "mobilinfo" telephoneId = 10760.0 type = "03_tel_funk" _remoteClass = "ogo.vo.OgoPhoneVO" number = "mobil" [3] = (Typed Object #9 'ogo.vo.OgoPhoneVO') info = " tel privat info" telephoneId = 10750.0 type = "05_tel_private" _remoteClass = "ogo.vo.OgoPhoneVO" number = "tel privat" [4] = (Typed Object #10 'ogo.vo.OgoPhoneVO') info = "fax info" telephoneId = 10730.0 type = "10_fax" _remoteClass = "ogo.vo.OgoPhoneVO" number = "fax" [5] = (Typed Object #11 'ogo.vo.OgoPhoneVO') info = "fax privat info" telephoneId = 10720.0 type = "15_fax_private" _remoteClass = "ogo.vo.OgoPhoneVO" number = "fax privat" email1 = "[EMAIL PROTECTED]" url = "" class=moz-txt-link-rfc2396E href="http://guse.conquer.de">"http://guse.conquer.de" degree = "keiner" phoneTypes = (Array #12) [0] = "01_tel" [1] = "02_tel" [2] = "03_tel_funk" [3] = "05_tel_private" [4] = "10_fax" [5] = "15_fax_private" otherTitle2 = "Pferdeheld" number = "OGo10610" email2 = "[EMAIL PROTECTED]" nickname = "Henna" gender = "male" owner = (Typed Object #13 'ogo.vo.OgoMinimalPersonVO') login = "knuffel" _remoteClass = "ogo.vo.OgoMinimalPersonVO" id = "skyrix://renner.flex/default/10360" isPrivate = true email3 = "email3" keywords = "" firmen = (Array #14) contact = (Typed Object #15 'ogo.vo.OgoMinimalPersonVO') login = "knuffel" _remoteClass = "ogo.vo.OgoMinimalPersonVO" id = "skyrix://renner.flex/default/10360" nachname = "Guse" otherTitle1 = "Knorzel" middlename = "Michael" firstname = "Henning" isAccount = true I attached the JavaVOs and the AsVOs as file. I still don't know why I'm not able to access person.phones (person.addresses doesn't work too ). If I go through person.phones and do if(person.phones[i] instanceof OgoPhoneVO) I get true. I tried implicit getters / setters, but this wasn't a real success. As mentioned in "developing rich clients with macromedia flex" on page 470 in the grey box, implicit getters/setters should not be used with RemoteObjects. After 2 days trying I don't have any more idea. I bet I am making a tiny mistake, but I can't figure out what it is. Greets Christoph Peter Farland wrote: If you've used Object.registerClass on both Phones and Person classes there should be no problem with them being returned in an Array (that is, the Flash Player creates the Phones instances during deserialization no matter how deeply nested). -- **************************************** Christoph Guse Löhstraße 34 41747 Viersen Tel. 0 21 62 / 50 24 066 Mobil 01 72 / 160 74 84 VoIP 0 12 12 / 39 64 48 831 ****************************************
Yahoo! Groups Links
|
- RE: [flexcoders] complex Remote Objects Dimitrios Gianninas
- RE: [flexcoders] complex Remote Objects Matt Chotin
- RE: [flexcoders] complex Remote Objects Peter Farland
- Re: [flexcoders] complex Remote Objects Christoph Guse
- RE: [flexcoders] complex Remote Objects Dirk Eismann
- RE: [flexcoders] complex Remote Objects Abdul Qabiz