6 Replies Latest reply on Apr 30, 2011 11:44 PM by wendy888

    Help! why the value does not change?


      in ViewStack at index=0 (home page) , I pass object to placements (index=1) when I click on a datagrid item.  The name on placements has the value that passed from home page.

      when I return to home page and click on another item on datagrid, I want the new value pass to placements page, but the first item data is still on the placements. How to refresh it?

      I need the value (text) of

      TextInput id="txtName"  on placement page changes as I assign at home page.


      See below

      [Bindable] public var objPlacementMain:Object = new Object;







      private  function gotoPlacements(event:ListEvent):void{


      this.objPlacementMain.name = this.dg.selectedItem.col1;
      this.homePlacement.selectedIndex = 1;

      <mx:ViewStack id="homePlacement">

      <mx:DataGrid id="dg" itemClick="gotoPlacements(event)">


      <mx:DataGridColumn headerText="Column 1" dataField="col1"/>


      <mx:DataGridColumn headerText="Column 2" dataField="col2"/>


      <mx:DataGridColumn headerText="Column 3" dataField="col3"/>





      objPlacement="{objPlacementMain}" />



      at placements


      [Bindable] public var objPlacement:Object = new Object;








      width="100%" height="30">



      <mx:Spacer width="48" height="25"/>



      <mx:Label text="Name " fontWeight="bold" width="51"/> <mx:TextInput id="txtName" text="{this.objPlacement.name }" width="193" editable="false"/>