Announcement Announcement Module
Collapse
No announcement yet.
inheritance in Actionscript Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • inheritance in Actionscript

    hi guys
    Using flex in UI and java in my backend.My remote object java class structure is like this

    Public class PersonDetail extends Person
    {
    String jailcode;
    String jailtime;
    set();
    get();
    }

    Public class Person extends Base
    {
    string personrace;
    string personage;
    String email;
    set();
    get();
    }

    Public class Base{
    String id;
    String name;
    set();
    get();
    }

    On the flex side can i create only a single class PersonDetail.as which contains all the 7 fields like this ?

    [RemoteClass(alias="myapp.PersonDetail ")]
    [Bindable]
    public final class PersonDetail
    {
    public var jailcode:String;
    public var jailtime:String;
    public var personrace:String;
    public var personage:String;
    public var email:String;
    public var id:String;
    public var name:String;
    }

    or is there a better way to do this?

    thanks
    Last edited by jaggernat; Feb 10th, 2011, 11:04 PM.

  • #2
    or is there a better way to do this?
    If the inheritance structure doesn't make sense in the flex-side, i'd not add them Person and Base). You can just have one class in the flex-side (having all the fields)

    Comment

    Working...
    X