3 Replies Latest reply on Jan 5, 2008 3:57 PM by VarioPegged

    data binding in cairngorm?

    mark416 Level 1
      Hi

      I have the carirngorm code here


      import ca.sb.CESF.ESF.vo.PersonVO;

      [Bindable]
      public var modelLocator:CESFESFModel = CESFESFModel.getInstance();


      <mx:TextInput id="eligible_total" x="723.5" y="1294" width="82" text="{getEligible(modelLocator.personData.emptstatus,new_total.text)}"/>


      * personData is a instance of PersonVO and it is defined in CESFESFModel.

      I get a warning error for modelLocator.personData.emptstatus.

      The error message is :

      Data binding will not be able to detect assignments to "emptstatus".

      I already use the "[Bindable]" for modelLocator but why I can not bind "modelLocator.personData.emptstatus"

      Thanks


      Mark
        • 1. Re: data binding in cairngorm?
          kruse Level 1
          Hi,

          I have also got this problem on some of my variables instanciated in the model locator.

          Did you come up with an solution on this?
          • 2. Re: data binding in cairngorm?
            m_hartnett Level 3
            I have run into this as well but I am not sure it is a Cairngorm problem.
            I also ran into this issue with some objects that are not Cairngorm based.

            I didn't have much luck in figuring out why it is a problem but use a binding statement as a work around.

            <mx:Binding source="modelLocator.personData.emptstatus" destination="someLocalVariable" />

            Your method would pass in the someLocalVariable as a argument.

            It certainly seems that it should be bindable right to the modelLocator but until I can figure out why this error happens we just use the local bindable variable.
            • 3. data binding in cairngorm?
              VarioPegged Level 2
              quote:

              I already use the "[Bindable]" for modelLocator but why I can not bind "modelLocator.personData.emptstatus"


              Your properties in your value object should also be declared bindable. Or you could just declare the whole PersonVO class as bindable:

              ...
              [Bindable]
              public class PersonVO
              ...

              TS