Hi guys, i am developing a new application and have the following situation: 1) In a control block the user can do some settings. 2) All datasources in the application depend on the settings. 3) When a user opens a form (consisting of multiple panels), the related datasources are being executed and data displayed. The challenge now is what to do when the user changes the settings. It is not possible to re-execute all datasources because that will take much too long. Preferrably i would like to close all opened panels. However, that has one big problem: when the user re-opens such panel, the old data (with the previous setting) is displayed and the "initialize" event is not triggered. I can think of two solutions: 1) Force somehow that the "initialize" event for the panels is always triggered instead on only on the first time the panel is opened. Is this possible? If yes i would be able to detect changes in the settings. 2) Reset the application completely in such a way that all panels are closed and datasources resetted to their not-yet-being-executed state. Please advise. Kind regards, Jan Willem |
Hi formspider team, is the second solution possible? Can i close all datasources, tabs and panels? How? Offcourse i know how to close a tab with panels, but the problem is that the panels always stay alive... Kind regards, Jan Willem |
Hi Jan Willem, One easy solution is to restart the application using the api_application.restart (http://theformspider.com/API/api_application.html#restart) A restart may not always be desirable though. There is not API to reinitialize a panel. However, you can requery only the datasources that need to be requeried. To do this, you may keep track of the datasources that are already queried and have a reference to the settings parameter being changed. I guess if you already know which panels should be reinitialized, it is not a far cry from there to figure out which datasources should be requeried. Hope this helps. Kind Regards, |