tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikola Milikic <nikola.mili...@gmail.com>
Subject Invoke method after page is loaded; when method finishes, redirect to another page
Date Fri, 04 Mar 2011 11:38:44 GMT
Hi to all,

I'm a newbie to Tapestry and would be grateful for a small assistance.

Since in my Tapestry 5.2 application I'm doing some calculations which can
take up to 30 seconds, I wanted to implement when a user clicks on a button
e.g. 'Calculate' to be transferred to a separate page on which the
calculation will be done (with some message like "Calculation in progress,
please wait" and loading icon).

My question is how to automatically after the calculation has been done
(method doing calculation ended) to transfer the user to a separate page to
display results?

My first idea was to annotate the method with @PageLoaded annotation:

> private ResultsPage resultsPage ;

> @PageLoaded
> ResultsPage calculate (){
>         // calculation here
>         resultsPage.setResults(somethingHere);
>         return resultsPage;
> }

but that wont do it. And in the documentation it is stated that this method
should return void.

I would be grateful for help here, or if there is a more subtle solution for
my idea, I'm open to suggestions.



Email: nikola.milikic@gmail.com
URL:   nikola.milikic.info

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message