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

RichTextEditor doesn't update it's value when the binding gets null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • mx: Rich Text Editor
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Language Found: English

    Description

      Play the following mxml:

      =======================================================
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="onCreationComplete()" xmlns:local="*">

      <mx:Script>
      <![CDATA[
      [Bindable]
      private var persona:Persona = null;

      private function onCreationComplete():void

      { persona = new Persona("Sergio"); persona.nombre="Sergio"; persona.apellidos="Aguado"; }

      private function onClick():void

      { var newPersona:Persona = new Persona("Pedro"); newPersona.nombre=null; newPersona.apellidos="Pol"; persona=newPersona; }

      ]]
      >
      </mx:Script>
      <mx:Button click="onClick()" label="changePerson"/>

      <mx:Label id="personNameLabel" text="

      {persona.nombre}" />

      <mx:RichTextEditor id="textEditor" width="100%" height="100%" htmlText="{personNameLabel.text}">
      </mx:RichTextEditor>

      <mx:RichTextEditor id="textEditor2" width="100%" height="100%" htmlText="{persona.nombre}

      ">
      </mx:RichTextEditor>
      </mx:WindowedApplication>
      =======================================================

      You will find that when the button is clicked and the value of the person is changed and it's name gets null the second
      RichTextEditor doesn't update itself. However the label updates.

      Workaround
      Bind the expression to a label (and make it invisible) and a RichEditor to that label.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: