2 Replies Latest reply on Sep 13, 2007 9:10 AM by Robert_Csiki

    Very odd behavior regarding variable naming with DataService.fill()

    Robert_Csiki Level 1
      I'm experiencing this odd behavior in LCDS 2.5, wich pertains to variable naming for the objects returned by a DataService.fill() call. I ceated a simple destination with a Java adapter. the Server side Java data object is defined as follows)

      package test;

      public class RepositoryObject
      private String m_strObjectId;
      private boolean m_bIsValid;
      private long m_lSize;

      [public setters and getters here]

      On Flex side, the ActionScript value object is defined as follows:

      package test
      public class RepositoryObject

      public var m_strObjectId:String;
      public var m_bIsValid:Boolean;
      public var m_lSize:Number;

      public function RepositoryObject()


      The FDS destination definition (in data-management-config.xml):

      <destination id="testDs">

      <adapter ref="java-dao" />



      <identity property="m_strObjectId"/>

      <paging enabled="false" pageSize="10" />
      <throttle-inbound policy="ERROR" max-frequency="500"/>
      <throttle-outbound policy="REPLACE" max-frequency="500"/>


      What I figured while debugging into the client was is the data returned by the service (I'm using the mx:DataService call) returns objects whose variable names do not match my definition:

      m_strObjectId becomes objectId
      m_lSize becomes size
      m_bIsValid becomes isValid

      I wonder why that renaming??? Basically "m_str" prefix was stripped and capital "O" became lower case "o" for my first variable etc.

      For instance, in a datagrid cell renderer I could not reference the returned value as {data.m_strObjectId}, but if I use {data.objectId}, it works.

      Any ideas why this behavior (which I found confusing and odd) would be greately appreciated.