1 Reply Latest reply on Dec 20, 2008 6:06 AM by Newsgroup_User

    Domain object

    vscmaster
      Hello!
      I use Spring back-end layer, when I communicate domain objects(Flex - Java), on the server I have zero in int, double fields, on the client this fields are declared as int and Number.

      Only String type transfer correctly!!!

      How I can resolve this problem?


      //Flex d-o
      [Bindable]
      [RemoteClass(alias="com.home.flex.bean.GoodsBN")]

      public class Goods
      {
      public var idGoods:int;
      public var code:int;
      public var name:String;
      public var weight:int;
      public var type:String;
      public var category:String;
      public var incomeDate:Date;
      public var description:String;
      public var price:Number;

      public function Goods()
      {}
      }

      //Java d-o
      public class GoodsBN //implements Serializable
      {
      private int idGoods;
      private int code;
      private String name;
      private int weight;
      private String type;
      private String category;
      private Date incomeDate;
      private String description;
      private double price;
      public GoodsBN()
      {

      }
      ///getter and setter.....
        • 1. Re: Domain object
          Level 7

          "vscmaster" <webforumsuser@macromedia.com> wrote in message
          news:gii9eo$4dl$1@forums.macromedia.com...
          > Hello!
          > I use Spring back-end layer, when I communicate domain objects(Flex -
          > Java),
          > on the server I have zero in int, double fields, on the client this fields
          > are
          > declared as int and Number.
          >
          > Only String type transfer correctly!!!
          >
          > How I can resolve this problem?

          I think Number _is_ the AS3 equivalent of Double