3 Replies Latest reply on Dec 9, 2009 11:00 PM by RUSH-ME

    Using another xml

    derok Level 1



      i'm looking at an example found here in the adobde site.


      its a cell phones catalog:




      here is the main mxml code:




      if you look at the end of this code you will see a declaration calling the component ProductsView, and specifying the xml catalog that it will use:




      <mx:HTTPService id="productService" url="data/catalog.xml"


                  <ProductsView id="pView" label="Products" catalog="{catalog}"
                      showEffect="WipeDown" hideEffect="WipeUp"


      my question is:


      how can i call again the ProductsView component again and specify another xml catalog so i can have another section of products?



        • 1. Re: Using another xml
          Flex harUI Adobe Employee

          Should just be


          productService.url = "someOtherURL";



          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: Using another xml
            derok Level 1


            but im having trouble calling the changes,


            lets say i put that in a function:


                     private function change():void


            and i call a new ProductsView  


                       <ProductsView id="pView2" label="NEW"  catalog="{catalog}"
                            showEffect="WipeDown" hideEffect="WipeUp"



            where do i  specify the change of the xml catalog?

            • 3. Re: Using another xml
              RUSH-ME Level 3



              I think There is no deed to specify a new product view. Just call that function change(). If the new data is present it will show the new data in the product information in the existing product view as you are updating the catalog arraycollection.


              Hope this helps


              Warm Regards