You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Andre Schmidt <an...@web.de> on 2007/07/02 11:14:53 UTC

refresh views after calculation in thread have finished

Hi!
Im new to this list, and i'm developing an JSR168 portlet.
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?
Any advice is very welcome!
Andre
-- 
View this message in context: http://www.nabble.com/refresh-views-after-calculation-in-thread-have-finished-tf4011032.html#a11390724
Sent from the Pluto - User mailing list archive at Nabble.com.


Re: refresh views after calculation in thread have finished

Posted by be...@netsos.com.
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




Re: refresh views after calculation in thread have finished

Posted by "A. Alonso Domínguez" <al...@social-labs.com>.
Andre Schmidt escribió:
> Hi!
> Im new to this list, and i'm developing an JSR168 portlet.
> 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?
> Any advice is very welcome!
> Andre
>   

Take a look over the www about the content-type multipart/replacement, 
but I'm really sure that you can do that with JSR-168 portlets....

Alonso