4 Replies Latest reply on Jan 5, 2011 3:53 PM by Gregory Lafrance

    PROBLEM: Multiple HTTTPServices not binding to correct dropdowns!!

    rehoover51

      there are 3 separate and distinct calls to HHTPServidce on this test page (https://studentdb.projectcadd.org/testNEW.html) ... the first call may work correctly but if i refresh or recall the page the data binds where it wants ... i am call very simple ASPX pages that contain a response.addheader call in them but this doesnt fix it either!

       

      i do believe it is a cache problem ...

       

      has anyone seen this problem and found a fix???

        • 1. Re: PROBLEM: Multiple HTTTPServices not binding to correct dropdowns!!
          Gregory Lafrance Level 6

          Trace out the data that is coming back from the server. I suspect this is a backend issue. HTTPService will not populate a different collection unless you tell it to.

           

          Its often good to boil your code down to a minimal yet complete application that still exhibits the issue.

          While boiling down the code, you may discover the issue yourself, but at least you will have a minimal yet complete code sample to post here, and then a solution will come very soon in most cases.

           

          If this post answers your question or helps, please mark it as such. Thanks!

          http://www.stardustsystems.com
          Adobe Flex Development and Support Services

          • 2. Re: PROBLEM: Multiple HTTTPServices not binding to correct dropdowns!!
            rehoover51 Level 1

            Thanks greg - I am in an endless loop on this because I am using the exact  ASPX code we used in the original version - the only difference is I am new at the flex end and I cant debug it in flash (trial version) ... one thing I did notice was that after I run the HTML code generated by flex, I goto the actual URL and I see that the node is from the other XML but the data is correct ex: (where Courses should be Classes) ...

             

             

             

            So, I can do anything on the backend, because when I debug it in ASPX it works 100% ... so, I am "blaming" Flex/Flash cuz I am a newbie and my code always worked with the web guy I used, so I believe he as using a caching fix on his side (I know he was using a random number id ...

             

            So, how can we trace this???

            • 3. Re: PROBLEM: Multiple HTTTPServices not binding to correct dropdowns!!
              rehoover51 Level 1

              As you can tell I am frustrated, with such a simple function ... I have over a 100 examples of code where we did this on a daily basis ... we called it talking back and forth in XML - though I do know that he was sending me XML compiled by creating the XML node by node in string concatenation, which I have found now that it can be done easily by using HTTPService (I have found two different ways to send back to ASPX using HTTPService) ...

               

              Also, I saw a response you made about searching XML nodes, my web guy was using XPATH in Flex to search thru the "deep" levels ... if that helps (though I didn’t see his code) ... I am trying to locate him for these solutions, but I think he is in spain?

               

              Thanks, if possible, we can net meet tomorrow and I can show u my code ... I also thought the testNEW.mxml was the most simplified code I could generate!

               

              rehoover

              • 4. Re: PROBLEM: Multiple HTTTPServices not binding to correct dropdowns!!
                Gregory Lafrance Level 6

                When the data comes back from the server just pop up and alert with it. You might need to use the ObjectUtil.toString() method:

                 

                import mx.utils.ObjectUtil;

                 

                Then in the result handler add this code:

                 

                mx.controls.Alert.show(ObjectUtil.toString(myResultEvent.result));

                 

                where myResultEvent is the name of the ResultEvent in your result handler method signature.

                 

                Launch the app, examine the Alert, then press F5 and see if the Alert text changes.

                 

                I'll be surprised if it does not change, because once you create a data provider control and bind a collection to it, and populate that collection from its own HTTPService call, that HTTPService cannot put the data in another collection, unless you have something else somewhere in your code. And in that case, Flex will not be the culprit.

                 

                If this post answers your question or helps, please mark it as such. Thanks!

                http://www.stardustsystems.com
                Adobe Flex Development and Support Services