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

[FlexJS] Binding not works expectedly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Apache FlexJS 0.5.0
    • Apache FlexJS 0.6.0
    • None
    • None

    Description

      [This issue also discussed at: http://apache-flex-users.2333346.n4.nabble.com/Binding-not-works-expectedly-td12171.html]

      Version: Apache FlexJS 0.5.0
      Output platform: HTML
      IDE: Flash Builder 4.7, Moonshine

      I am having trouble binding a ValueObject to UI elements (i.e. text input, label) which updates by DataGrid.selectedItem upon application State change - DataGrid and UI elements are exists in different States. Upon DataGrid.selectedItem, application change it's State, update the ValueObjects field which is binded to UI elements.

      By saying that:

      1. State A has DataGrid
      2. State B has a ViewBase component (VB)
      3. When clicked on DataGrid row it's change handler function called
      5. In change handler function application first changed it's State to B - component 'VB' became visible. Then injects DataGrid.selectedItem to component 'VB's [Bindable]ValueObject property
      7. Said ValueObject has it's own GET/SET method along with 'changed' event dispatcher

      private var _selectedAgent:AgentChain; 
                              
      [Bindable("selectedAgentChanged")] 
      public function get selectedAgent():AgentChain 
      { 
              return _selectedAgent; 
      } 
      public function set selectedAgent(value:AgentChain):void 
      { 
              if (value != _selectedAgent) 
              { 
                      _selectedAgent = value; 
                      dispatchEvent(new Event("selectedAgentChanged")); 
              } 
      }
      

      8. Even application State changed and ValueObject's SET method called, it's bindable UI elements never updated. Note: This problem specifically in HTML output nor SWF.

      I am attaching herewith a POC project to describe my problem - TestFlexJSTableForAlex.ZIP.

      Attachments

        Activity

          People

            aharui Alex Harui
            santanu4ver Devsena
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: