Wii best blog news Where do babies come from? Electronica
Seen be repeatable in other languages \u200b\u200bsuch as. NET or C # (to name one) This case is not going to comment in detail with code, if not with the theory. If you want details of code, I raised this issue in the forum of Made In Flex, and whose direct link is:
http://groups.google.com/group/madeinflex/browse_thread/thread/927ccf8df69c887e?hl=es To begin, I will discuss the technological environment in which this story unfolds. On the backend we have a MySQL database, Apache web server and PHP. PHP is used to meet requests by URL, database access, with information operations, and return XML. For the frontend we have a swf (Flash) created from Flex.
continue with the purpose of the application, describing its interface. Well, it's a module for managing data in a table (in my case were users). To do this, on top incorporates a DataGrid (or table) that lists summary information for each record (each row). At the bottom is a form that acts tab. When the user clicks a record in the DataGrid, it displays the information.
When starting the application, it invokes a HTTPService service, which calls the corresponding PHP service gets the list of users, generating XML, it returns, and Flex takes this result and bind it to DataGrid (in Flex is done through the DataProvider property.)
Now go to a simple operation data modification: insertion. When you create a new user, you click on the button 'New', which leaves the user tab empty and off the DataGrid (you can select rows or records). The user enters information for the new user. When finished, click the 'Create' button. The operations that are triggered are: OK or an error message
2) Flex contains the result.
3) If the result is not OK, it displays an error message (Alert.show (in other languages \u200b\u200bwill MessageBox, MsgBox
...). 3) If the result is OK: - Information that has been successful ( Alert.show)
- Activate and deactivate the form DataGrid
- Calling back to the HTTPService to get the list of users
- Refresh the DataGrid
This is the theory, but the DataGrid refresh does not work. Remains the same data before creating the record. However, it seems that the DataGrid has been redrawn (there is a small fliqueo or flashing).
If I leave the application and re-run, the DataGrid is loaded properly. Do not do this every time you change the table.
Actually there is no error. The problem is that the call to HTTPService which returns the list of users, is always in the same way. That is, a simple call with a single parameter which always has the same value. This causes the web server pull the cache, which always returns the same XML.
And how do you solve this?. For creating a parameter is not used, and that always takes a different value. You can add the HTTPService to get the list of users, a parameter that incorporates the full hour, or to generate a random number. In this way, the web server will see that is a different call to the recently executed, and execute the php script instead of returning what is in the cache. IT Technology News
Mexican Models Photo Models