You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by pradeepchy <pr...@gmail.com> on 2011/11/08 23:27:26 UTC
Setup methods are called twice while requesting a page.
Hi All,
I am facing a strange problem in my application. I have observed that page
setup methods with annotation either @SetupRender or @BeginRender are called
twice whenever a request is made to that page. In these methods I am calling
the database methods to pull data from db.
@SetupRender
void setupdata(){
//DB Call.
}
Is there any work around to protect the extra call, please suggest.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Setup-methods-are-called-twice-while-requesting-a-page-tp4975888p4975888.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Setup methods are called twice while requesting a page.
Posted by pradeepchy <pr...@gmail.com>.
Thanks Christian-
I have spotted the problem with the help of your trick to know the exact
cause of it.
Thanks for your help.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Setup-methods-are-called-twice-while-requesting-a-page-tp4975888p4977710.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Setup methods are called twice while requesting a page.
Posted by Christian Riedel <cr...@googlemail.com>.
Hi,
you could add log statements to your code that print out the request url. That way you'll probably find out where the second request comes from.
I suspect a broken img-src attribute to be the cause. Some typo like this:
<img src="{asset:something}" />
Cheers
Christian
Am 08.11.2011 um 23:27 schrieb pradeepchy:
> Hi All,
> I am facing a strange problem in my application. I have observed that page
> setup methods with annotation either @SetupRender or @BeginRender are called
> twice whenever a request is made to that page. In these methods I am calling
> the database methods to pull data from db.
>
> @SetupRender
> void setupdata(){
> //DB Call.
> }
>
> Is there any work around to protect the extra call, please suggest.
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Setup-methods-are-called-twice-while-requesting-a-page-tp4975888p4975888.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org