Only public bean-like variables (either public member variables or properties 
that have the correctly named getX/setX accessors as per the bean naming 
convention) from your Java class can be serialized/deserialized. Only public 
member variables from your AS class can be serialized/deserialzied (getter and 
setter properties in AS2 are, unfortunately, not serialized by NetConnection in 
Flash Player 7).

While _remoteClass is deprecated but supported in Flex 1.5, I suggest using 
Object.registerClass to allow for fast, native player deserialization of 
RemoteObject results from AMF data. 

So... I'd prefer to see your Java and AS classes look like this:


package ogo.vo;

public class OgoAccountTestVO
{
    // Objekt Variablen
    private String id;
    private String login;
    private String password;
   
    public OgoAccountTestVO(){}
   

    public String getId()
    {
        return id;
    }

    public void setId(String i)
    {
        id = i;
    }

    public String getLogin()
    {
        return login;
    }

    public void setLogin(String l)
    {
        login = l;
    }

    public String getPassword()
    {
        return password;
    }

    public void setPassword(String p)
    {
        password = p;
    }
}


public class ogo.vo.OgoAccountTestVO 
{
    public id:String;
    public login:String;
    public password:String;
    private static var reg:Boolean = 
Object.registerClass("ogo.vo.OgoAccountTestVO", ogo.vo.OgoAccountTestVO);

    public function OgoAccountTestVO() 
    {
    }
}




-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Christoph Guse
Sent: Tuesday, May 31, 2005 11:32 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] VO problem

Hello List,

I still need help. The mapping between Java and Flex confuses me 
totally. Let give you an example.

example Java Value Object
package ogo.vo;

import java.io.Serializable;

public class OgoAccountTestVO implements Serializable{

    // Objekt Variablen
    private String id;
    private String login;
    private String password;
   
    public OgoAccountTestVO(){}
   
}

And this is what Java2AS gives me:
class ogo.vo.OgoAccountTestVO {


    public var _remoteClass : String;

    public function OgoAccountTestVO() {
        _remoteClass="ogo.vo.OgoAccountTestVO";
    }

}

As you can see the Strings are totally missing. In my app I use more 
complex VOs and most of the VO variables are missing. I checked that by 
the console output of tomcat. Abdul's hint didn't change anything.

Any ideas?

Greets
Christoph

Hi Christophe,

Try to force recompile your application by appending "recompile=true" to URL, 
for example:

http://www.yourserver.com/app.mxml?recompile=true

If that too doesn't work, then there is some other issue...

-abdul 

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL <mailto:%5BEMAIL> PROTECTED] On 
Behalf Of 
Christoph Guse
Sent: Friday, May 27, 2005 5:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] VO problem

Hi List,

I have some problems with my ValueObjects. First I give you my system 
configuration:

SuSE Linux 9.2
Tomcat 5.5.7
Flex 1.5
Eclipse 3
Java 1.5

In my application I have Java Value Objects on the server side and I 
mapped them to my ActionScript 2.0 with Object.registerClass().
My problem is FLEX seems not to notice changes on the Java Value 
Objects. If I add a variable to the Java VO and the AS2 VO FLEX doesn't 
show it. I started tomcat again, no change.
To check if I did the AS2 VOs correctly I used Java2AS written by 
Christophe Conraets. Here is the same effect. I change the Java VO, 
restart FLEX and Java2AS shows no change. I checked the class file 
created by Java, the changes are in there. The Java VO works fine in 
Java, every change is in it and the class file is composed in the 
WEB-INF/classes directory of my FLEX app.
I'm a little bit confused. Is there any cache or something like that I 
can delete? Or is there anything in the flex-config.xml I didn't notice?

I appreciate for any help.

Greets
Christoph



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



 




 
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/
 


Reply via email to