11 Replies Latest reply on Mar 26, 2009 8:41 AM by BosDog

    IE Flex bug?

    BosDog Level 1
      I'm new to Flex and still learning (SORRY FOR THE LONG POST but its a strange scenario). I have a very strange issue happening thats really been bothering me. I've setup Flex to correctly map to my ColdFusion RDS development server. I followed the instructions to use the CF/Flex Wizard and am able to create a simple CRUD app. In the example they use the artists DB (which is microsoft access). I'm using an Oracle DB. I correctly map out 3 pages... 2 master and 1 detail. When I compile and run the app... it appears to work fine. I can drill into an employee... see their multiple comp plans, and then there is that edit button to edit the detail page (or double-clicking of the row). This is where it sometimes works and it sometimes doesn't! The edit page will sometimes show the information and other times it will not load anything! If I click on the Edit button 10 times... the data will load 4/10 times, other times it won't at all. In FireFox the app works perfect. IE 6 and 7 is having this issue. It's almost as if the selectedItem is not passing the primary key to the details page everytime. I found that if I click on an item and wait 10-15 seconds and then click edit it will usually work everytime. Also, I have Trusted Cache OFF in my CF admin settings... but I find that clearing template cache right before I click edit will also have it work nearly every time. This is really bothering me and seems like some sort of bug! I can't figure out if its a Flex, CF, IE, or an Oracle one though. This simple app will determine if my company will purchase Flex licenses, so if we can't rely on the data pulling everytime we will not purchase it (but I'd love to figure this out so I can make the case). Please Help.
        • 1. Re: IE Flex bug?
          Level 7

          "BosDog" <webforumsuser@macromedia.com> wrote in message
          news:gqaqdl$bhc$1@forums.macromedia.com...
          > I'm new to Flex and still learning (SORRY FOR THE LONG POST but its a
          > strange
          > scenario). I have a very strange issue happening thats really been
          > bothering
          > me. I've setup Flex to correctly map to my ColdFusion RDS development
          > server. I
          > followed the instructions to use the CF/Flex Wizard and am able to create
          > a
          > simple CRUD app. In the example they use the artists DB (which is
          > microsoft
          > access). I'm using an Oracle DB. I correctly map out 3 pages... 2 master
          > and 1
          > detail. When I compile and run the app... it appears to work fine. I can
          > drill
          > into an employee... see their multiple comp plans, and then there is that
          > edit
          > button to edit the detail page (or double-clicking of the row). This is
          > where
          > it sometimes works and it sometimes doesn't! The edit page will sometimes
          > show
          > the information and other times it will not load anything! If I click on
          > the
          > Edit button 10 times... the data will load 4/10 times, other times it
          > won't at
          > all. In FireFox the app works perfect. IE 6 and 7 is having this issue.
          > It's
          > almost as if the selectedItem is not passing the primary key to the
          > details
          > page everytime. I found that if I click on an item and wait 10-15 seconds
          > and
          > then click edit it will usually work everytime. Also, I have Trusted Cache
          > OFF
          > in my CF admin settings... but I find that clearing template cache right
          > before
          > I click edit will also have it work nearly every time. This is really
          > bothering
          > me and seems like some sort of bug! I can't figure out if its a Flex, CF,
          > IE,
          > or an Oracle one though. This simple app will determine if my company will
          > purchase Flex licenses, so if we can't rely on the data pulling everytime
          > we
          > will not purchase it (but I'd love to figure this out so I can make the
          > case).
          > Please Help.

          I don't know about anyone else who posts here, but usually when I come to
          this forum to try to help people I am very tired and burnt from coding all
          day, and I am just not able to make my eyes make sense of text written with
          no paragraph breaks. Maybe I can help you, maybe I can't, but I just am not
          able to read your post.


          • 2. Re: IE Flex bug?
            Richard_Abbott Level 3
            BosDog,
            picking out one sentence in the middle, you say "[IE] the data will load 4/10 times, other times it won't at all. In FireFox the app works perfect".
            Now, there is an issue regarding some kinds of HTTP access with IE in that the browser caches items rather longer than FF (or Safari for that matter - it's to do with the granularity of the cache date-time values.
            There's a standard trick which you will find many examples on this list where you add a random discriminator to your HTTP call (typically something based on the current timestamp).
            The HTTP cache then treats the call as different, because the extra parameter differs. Do a search for this "trick", try again and see what happens.
            If this is the cause, it's not exactly a bug anywhere but it is a browser-specific issue.
            Richard
            • 3. Re: IE Flex bug?
              BosDog Level 1
              hi richard. it is strange though that the Microsoft Access DB apps will work fine in IE.

              i'll try you're trick but i'm not sure where to put it. i created a CRUD app using the Coldfusion Flex Wizard which genereated 3 CFCs. A BEAN, DAO, and GATEWAY. would i add this timestamp to the MXML file or use a CF Timestamp on one of those CFCs?
              • 4. Re: IE Flex bug?
                Richard_Abbott Level 3
                Hi BosDog,
                can't help you there I'm afraid - personally I don't use the wizards but just hack away(!). Typically what you find is that somewhere there is a call to either HTTPService or URLRequest or some such, which will be taking a destination address. Let's say it is
                blah.jsp?id=42
                then you would need something like
                blah.jsp?id=42&sep=12345
                where 12345 was actually generated from your random generator. I may be on to completely the wrong thing here, but certainly caching problems often turn out to be the cause of this kind of unexpected result.
                Richard
                • 5. Re: IE Flex bug?
                  BosDog Level 1
                  i know exactly what you mean b/c i've done this before for a blackberry html page. blackberry browsers cache everything so i needed to specify a random id.

                  however,
                  if this is a caching issue... wouldnt you think that the last employee record details would pull? instead every editable column that should be populated w/ a value is showing as 0 or null. i also turned on logging for my datasource so i could open the log file and see the SQL generated. it's actually using the different ids.

                  editing my DAO.cfc file and saving and then clicking on a row and getting the details will always bring back the desired results.

                  I've even tried checking and unchecking the "Maintain sessions across client requests" option in the CFAdmin for this datasource but still this happens.
                  • 6. Re: IE Flex bug?
                    Richard_Abbott Level 3
                    BosDog,
                    sounds like you are right and the caching business is a red herring - I agree that you'd expect to get the last values in that case. Unfortunately I don't know enough about what the wizard generates for you to be of much help here,
                    Richard
                    • 7. Re: IE Flex bug?
                      Level 7

                      "BosDog" <webforumsuser@macromedia.com> wrote in message
                      news:gqdj71$stn$1@forums.macromedia.com...
                      >i know exactly what you mean b/c i've done this before for a blackberry
                      >html
                      > page. blackberry browsers cache everything so i needed to specify a random
                      > id.
                      >
                      > however,
                      > if this is a caching issue... wouldnt you think that the last employee
                      > record
                      > details would pull? instead every editable column that should be populated
                      > w/ a
                      > value is showing as 0 or null. i also turned on logging for my datasource
                      > so i
                      > could open the log file and see the SQL generated. it's actually using the
                      > different ids.
                      >
                      > editing my DAO.cfc file and saving and then clicking on a row and getting
                      > the
                      > details will always bring back the desired results.
                      >
                      > I've even tried checking and unchecking the "Maintain sessions across
                      > client
                      > requests" option in the CFAdmin for this datasource but still this
                      > happens.

                      Try installing Charles and see what it tells you about the traffic.


                      • 8. Re: IE Flex bug?
                        BosDog Level 1
                        Charles? Is that a person? Can you provide a link to somewhere b/c I haven't the slightest.
                        • 9. Re: IE Flex bug?
                          Level 7

                          "BosDog" <webforumsuser@macromedia.com> wrote in message
                          news:gqe7dv$o4k$1@forums.macromedia.com...
                          > Charles? Is that a person? Can you provide a link to somewhere b/c I
                          > haven't the slightest.

                          http://www.charlesproxy.com/


                          • 10. Re: IE Flex bug?
                            BosDog Level 1
                            thanks Amy! this looks like a very useful tool i will install and play around with it.
                            • 11. Re: IE Flex bug?
                              BosDog Level 1
                              It seems that the problem was b/c Flex was just behaving too FAST. I fixed this by slowing down the processing so that the query can return its results and fill the Flex grid. By adding the following code in my CFC after my query and again after my <cfscript> that sets the obj paramaters:

                              <cfthread action="sleep" duration="1000" />

                              I was able to slow down the execution so that it works and populates the data grid EVERY time. This is probably something Adobe should look into for Flex apps in IE that are connecting to Oracle DBs with queries that take under a second.