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

    Using another xml

    derok Level 1

      Hi,

       

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

       

      its a cell phones catalog:

       


      http://examples.adobe.com/flex2/inproduct/sdk/flexstore/flexstore.html

       


      here is the main mxml code:

       


      http://examples.adobe.com/flex2/inproduct/sdk/flexstore/srcview/index.html

       


      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"
              result="productServiceResultHandler(event)"/>

       


                  <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?

       


      thanks

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

          Should just be

           

          productService.url = "someOtherURL";

          productService.send()

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

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

          • 2. Re: Using another xml
            derok Level 1

            ok

            but im having trouble calling the changes,

             

            lets say i put that in a function:

             

                     private function change():void
                    {
                        productService.url="data/newcatalog.xml";
                        productService.send();
                    }

             


            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

              Hi

               

              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

              Rush-me