2 Replies Latest reply on Dec 10, 2012 6:51 AM by _del_p_

    ignore property on RemoteObject

    Thomas Klaas



      I have got some AS Object that are mapped to an Java object with the RemoteClass metatag.


      Is it possible to define extra properties just on Flex site to store some data at runtime?
      If there is no getter/setter for this value on Java site, I got the following error on Java site:

      [BlazeDS]Unable to create a new instance of type 'FlexObject'.


      The documentation says that I can add the following tagto my amf channel definition to ignore INCOMING properties that cannot be det in my flex object.

      <ignore-property-errors> true </ignore-property-errors>


      Is there any metatag taht I can add to my flex object that tell Blaze DS not to send this property to the client?

      Something like this:



      public var clientProperty:Object;


      Or is it possible by subclassing my mapped object and add an additional property?


      Thanks for your help,


        • 1. Re: ignore property on RemoteObject
          Thomas Klaas Level 1

          I made some more testing on this topic and it turns out, that ist is possible to have properties that doesn't exist on Java Side without any problems.

          But this property have to be able to be mapped as a java Object, even if there is no setter within the Java Object.


          In my case I wanted to add a property as an object that has no remote class. But this object itself has a property that has a remote class that had no empty constructor because this remote class was only used to send data from Java to Flex. After adding an emtpy contructor, everything works fine.




          But I am still interested in my question if there is a metatag to ignore some properties. That could reduce the size of the data that is tansferred through BlazeDS.

          • 2. Re: ignore property on RemoteObject

            This may be a VERY old question but on the off chance that someone looks at it, it looks like what you are after is the [Transient] metadata tag.




            Use the [Transient] metadata tag to identifies a property that should be omitted from data that is sent to the server when an ActionScript object is mapped to a Java object using the[RemoteClass] metadata tag.

            The [Transient] metadata tag has the following syntax:

            [Transient] public var count:Number = 5;