3 Replies Latest reply on Oct 5, 2007 7:22 AM by paulo.larini

    Binding XML problems

    paulo.larini Level 1
      My XML is shown in a TileList, but when I change the value of an internal element of this XML, the tiles does not reflect this.

      XML:
      [Bindable] private var guias:XML=
      <guias>
      <guia>
      <numeroGuia>120394012</numeroGuia>
      <beneficiario>Marieta severa</beneficiario>
      <dataAtendimento>10/09/2007</dataAtendimento>
      <procedimentos>
      <procedimento>
      <sequencia>1</sequencia>
      <data>10/10/2007</data>
      <codigo>100102230</codigo>
      <procedimento>Visita hospitalar</procedimento>
      <quantidade>1</quantidade>
      <valor>100.34</valor>
      <valorTotal>100.34</valorTotal>
      <qtdAuditada>1</qtdAuditada>
      <vlrAuditado>100.34</vlrAuditado>
      <acaoAdministrativo>2</acaoAdministrativo>
      <acaoEnfermeira>1</acaoEnfermeira>
      </procedimento>
      .....

      Tile:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:bn="components.*" width="178" height="100"
      paddingLeft="5"
      paddingRight="5"
      verticalGap="1">
      <mx:HBox>
      <mx:Text text="Fatura:"/>
      <mx:Label text="{data.numeroGuia}"/>
      </mx:HBox>

      <mx:Label text="{data.beneficiario}"/>
      <mx:Label text="{data.dataAtendimento}"/>
      <mx:Label text="Itens a analisar: {data.procedimentosAnalisar}"/>
      <mx:Label text="Valor glosado: {data.procedimentosValorGlosado}"/>
      </mx:VBox>


      tile component usage:
      <mx:TileList id="tlGuias" width="100%" height="100%"
      itemRenderer="views.TileGuia"
      dataProvider="{guias.children()}"
      change="tlGuiasChange()">
      </mx:TileList>

      If I change the "beneficiario" property, nothing happens with the tile, still displaying old value:

      <mx:Button id="test" click="guias.guia[0].beneficiario='John' "/>


      What is happen?