0 Replies Latest reply on Mar 23, 2011 1:09 PM by arvaroo

    Creating a dynamic nested menu with xml data received from a webservice


      I need to create a dynamic menu based on a xml returned by a webservice.
      the xml comes basically in this format:




              <projeto nome="name" cliente="client name">
                  <atividade nome="name">




                      (other etapas)


                   (other atividades)


              (other projetos)


      What I need is to create a menu like:


      - Projeto.Nome - Projeto.Cliente:
          - Atividade.nome:
              (start button) etapa1
              (start button) etapa2


      - Projeto2.Nome - Projeto2.Cliente:
          - Atividade.nome:
              (start button) etapa1
              (start button) etapa2


      And so on...


      I've tried using an HTTPService and a DataGroup, this code above works fine for  display the projeto's names:


      <s:HTTPService id="loginService"
                              method="POST" contentType="application/xml"
                              fault="handleFault(event);" >


                              <s:request xmlns="">




      and the DataGroup:


      <s:DataGroup dataProvider="{tarefasService.lastResult.resposta.dados.projeto}" width="100%" y="100" x="20"
                      <s:VerticalLayout />
                                  <s:HorizontalLayout />
                              <s:Button />
                              <s:Label text="{data.nome}" />


      I have then tried including another datagroup inside the datagroup item renderer, but I just couldn't get it to work anyway, and tried it in a lot of ways... (basically, it would be a datagroup with dataProvider={data.atividade}).


      Can anyone tell me how to get this to work?


      I've uploaded an example xml, you can use it as the url for the HTTPService:


      Thanks in advance.