Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-35236

Binding is not working when [Bindable] is set for the class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Apache FlexJS 0.8.0
    • Apache FalconJX 0.8.0
    • FlexJS
    • None

    Description

      Binding is not working when [Bindable] tag is set up for the class. If data source of some control will contains value objects with following code:

      [Bindable]
      public class MenuItemVO
          {
              public var label:String;
              public var disabled:Boolean;
              public var hasDivider:Boolean;
      
              public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean = false)
              {
                 this.label = label;
                 this.hasDivider = hasDivider;
                 this.disabled = disabled;
              }
          }
      

      Workaround is to set up [Bindable] for each property in value object:

      public class MenuItemVO
          {
              [Bindable]
              public var label:String;
              [Bindable]
              public var disabled:Boolean;
              [Bindable]
              public var hasDivider:Boolean;
      
              public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean = false)
              {
                 this.label = label;
                 this.hasDivider = hasDivider;
                 this.disabled = disabled;
              }
          }
      

      Attachments

        Issue Links

          Activity

            People

              aharui Alex Harui
              pete21 Piotr Zarzycki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: