Re: refresh views after calculation in thread have finished

[email protected]
Newsgroups gmane.comp.jakarta.pluto.user
Message-ID <[email protected]>
Andre,

In reference to your question:

> On ActionRequest i start a thread that calculates something. While the
> Thread is calculating i want to show a page that says "Hey, wait a minute,
> i'm busy!" When the thread has finished calculations it calls a callback
> function and I want to present the results.
> How can i force a refresh of views without having user interaction?
> Is this possible at all?

If your Runnable implements Serializable, you can put it in the user's
session with PortletSession.APPLICATION_SCOPE... this will make it
available to servlets as well.  You can then use ajax polling or something
similar to query a servlet and check if the process is complete, and then
update the portlet's view with the result.

HTH,

Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.