Hello...I seem to be full of questions...!
How can I force an application to refresh its view? I am trying using the Announcement framework to send an announcement to an application (from another object) and then have it refresh the display to include new information (for example, someone else just entered some new data in another system). I am getting the announcement, but when I try a "self viewMain" it executes the viewMain code, but does not actually change the display. I can successfully display the correct information to a Transcript window...the web page just does not repaint. The next time it does, however, the information is updated. It "feels" like the page does not know it is "dirty," so it goes through the motions but doesn't really force the browser to repaint. Thanks again... Rob Rothwell _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
On Wed, 6 Feb 2008 13:33:13 -0500
"Rob Rothwell" <[hidden email]> wrote: > Hello...I seem to be full of questions...! > > How can I force an application to refresh its view? > > I am trying using the Announcement framework to send an announcement to an > application (from another object) and then have it refresh the display to > include new information (for example, someone else just entered some new > data in another system). > > I am getting the announcement, but when I try a "self viewMain" it executes > the viewMain code, but does not actually change the display. I can > successfully display the correct information to a Transcript window...the > web page just does not repaint. The next time it does, however, the > information is updated. And that is the source and solution of your problem: You want to "push", while web browsers usually only "pull". The browser sends a request to the server, which in turn causes the server to render the contents (produce html) of the requested page. This is transferred to the browser, which in turn renders the html into a meaningful GUI. If you don't use special "server push" technology, another way of achieving a similar effect would be to periodically query the application for status updates ... AJAX is used for stuff like this. s. _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Stefan,
Thanks for the information... On Feb 6, 2008 4:29 PM, Stefan Schmiedl <[hidden email]> wrote:
In other words the browser only refreshes itself when it wants to! If you don't use special "server push" technology, another way of So...would you just recommend using one of the AJAX methods like "updateEverySeconds:" to poll for changes? I was actually trying to write a simple little department "chat" program, and the AJAX way works, but checking the server every few seconds just seemed like a bit much. Can I create a new type of component that simply ask the server for an update "on demand" rather then periodically? I am getting a message and all the information I need is in my domain model... Maybe what I'm asking for is already part of the AIDA AJAX elements and I just don't know how to use it... Thanks again, Rob _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
On Wed, 6 Feb 2008 16:48:44 -0500
"Rob Rothwell" <[hidden email]> wrote: > In other words the browser only refreshes itself when it wants to! ... unless you specify a refresh meta tag, for example, which does for the whole page what I assume updateEverySeconds: does for a single element. > > If you don't use special "server push" technology, another way of > > achieving a similar effect would be to periodically query the > > application for status updates ... AJAX is used for stuff like this. > > > So...would you just recommend using one of the AJAX methods like > "updateEverySeconds:" to poll for changes? I was actually trying to write a > simple little department "chat" program, and the AJAX way works, but > checking the server every few seconds just seemed like a bit much. wellllllll... google has a "special" search dialog somewhere (probably in "beta" :-) which polls the server after every keystroke recorded by the input box. If you type slow enough, you can watch suggestions for search terms pop up. > Can I create a new type of component that simply ask the server for an > update "on demand" rather then periodically? I am getting a message and all > the information I need is in my domain model... Define "on demand". Who is the "I" getting the message. I assume that the "I" owning "my domain model" is the application server. > > Maybe what I'm asking for is already part of the AIDA AJAX elements and I > just don't know how to use it... > I'll defer to people actually knowing AIDA on this one :-) s. _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Stefan,
Someday, I too may have useful information for those in need! wellllllll... google has a "special" search dialog somewhere (probably Is that why typing in GMail is so slow sometimes? Define "on demand". Who is the "I" getting the message. I assume that If I have this right, in AIDA, a WebApplication object is bound to a single instance of a domain model object. Each new web session generates a new WebApplication instance. Within that instance (containing all the various form rendering methods) I am receiving a message indicating that the domain model the WebApplication instance is bound to has changed. At that point, or "on demand," I would like to tell my WebApplication instance to refresh itself! I'll defer to people actually knowing AIDA on this one :-) Yea...I'm probably doing something backwards. I'm just starting to be comfortable with Smalltalk in general (I still feel like I'm trying to think inside-out), and while AIDA seemed easier to pick up than Seaside (for a novice, at least), I am still not quite there yet! However, I have run a Seaside example that I THINK is similar to what I am trying to do (http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/), so I am hoping it can be done with AIDA as well! Thanks for your help, Rob _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |