1 Reply Latest reply on Dec 3, 2007 5:14 PM by seth_hodgson

    final properties isn't serilised from java to flex

    Level 1
      At Java side I have this class:

      public final class TitleName {
      public final Integer id;
      public final String name;

      that at Flex side I try to use as Dynamic Object. But calling Java service and obtainin this object as call result at Flex side I've got empty Object without any property. When I remove final declaration from Java fields all works correctly and at Flex I have Objects with id and name.

      Is this a bug?
        • 1. Re: final properties isn't serilised from java to flex
          seth_hodgson Level 1
          Hi Den,

          That's not a bug - it's a result of the AMF serialization rules.

          http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/ wwhelp.htm?context=LiveDocs_Parts&file=serialize_data_3.html

          For a class to support AMF serialization it must follow Java bean syntax (no-arg constructor, public get/set properties or public readable/writeable variables, etc.). The 'final' keyword makes the variable unwriteable - and thus, unserializable.