1 Reply Latest reply on Apr 25, 2006 4:57 PM by Digital_Hand

    Send complex data as object

    Digital_Hand
      Hi all,

      I want to make sure if I am in the right way. Because once I executed my application and press on Generate Button
      it gives me the following message ""There is no handler for a error event"

      In abstract, I am going to send an object that consist of another type of objects. that object has a type of TCRComponents
      and I defined as the following

      TCRComponents.as
      ----------------------------

      import virtualCodeGenerator.*;

      class virtualCodeGenerator.TCRComponents {


      public var textComp1 : TextBoxComponent;
      public var checkComp1 : CheckBoxComponent;
      public var radioComp1 : RadioButtonComponent;

      static var registered= Object.registerClass("virtualCodeGenerator.TCRComponents", virtualCodeGenerator.TCRComponents);

      }

      and the rest are:

      TextBoxComponent.as
      -------------------------------

      class virtualCodeGenerator.TextBoxComponent {

      public var textCompId : String;
      public var textCompTitle : String;
      public var textCompLength : Number;
      public var textCompDescription : String;
      public var textCompPriority : Number;

      static var registered= Object.registerClass("virtualCodeGenerator.TextBoxComponent", virtualCodeGenerator.TextBoxComponent);

      }

      CheckBoxComponent.as
      ----------------------------------

      class virtualCodeGenerator.CheckBoxComponent {

      public var checkCompId : String;
      public var checkCompTitle : String;
      public var checkCompDescription : String;
      public var checkCompPriority : Number;

      static var registered= Object.registerClass("virtualCodeGenerator.CheckBoxComponent", virtualCodeGenerator.CheckBoxComponent);

      }

      RadioButtonComponent.as
      -------------------------------------

      class virtualCodeGenerator.RadioButtonComponent {

      public var radioCompId : String;
      public var radioCompTitle : String;
      public var radioCompDescription : String;
      public var radioCompPriority : Number;

      static var registered= Object.registerClass("virtualCodeGenerator.RadioButtonComponent", virtualCodeGenerator.RadioButtonComponent);

      }


      In the server side [Java], it should receive just one parameter of type TCRComponents.
      so, did I make such mistake.

      I am using Flex 1.5
        • 1. Re: Send complex data as object
          Digital_Hand Level 1
          Is that possible to combine three different objects inside one object? In java its soo simple. But once you deal with Flex, it becomes a bit hard.

          Three components [ TextBoxComponent, CheckBoxComponent, and RadioButtonComponent ] located too in class folder as .class files with the
          same variables name.

          Does the following code is fine for the Flex 1.5

          static var registered= Object.registerClass("virtualCodeGenerator.RadioButtonComponent", virtualCodeGenerator.RadioButtonComponent);

          Do I need to change it to be more suitable for 1.5 version?