You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by #Cyrille37# <cy...@gmail.com> on 2007/11/16 14:51:59 UTC

[T4] about cookie and page cycle

Hello,
I've found howto set a cookie.

I come to you to know more about why setting the cookie in renderPage() 
works, but not in beginPageRender() ??

Thanks
Cyrille

=================
I put my little code here, to archive it in Internet ;-)

public abstract class Home extends BasePage
{

    @Override
    public void renderPage( ResponseBuilder builder, IRequestCycle cycle )
    {
      super.renderPage( builder, cycle );
      setCookie("TestCookie", "789");
    }

    @InjectObject("infrastructure:cookieSource")
    public abstract CookieSource getCookieSource();

    void setCookie( String name, String value )
    {
      getCookieSource().writeCookieValue(name, value);
    }

}


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org