tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Re: Tapestry 5.2 - Request data shared in different client browser
Date Wed, 02 Mar 2011 05:18:29 GMT
Yes, this is a subtle offshoot of the 5.2 changes.  What you've done
is identify that single instance of LoginVO as the default value for
the loginVo field.

In 5.1, your bug was that different clients who accessed the same page
instance sequentially would see data bleed from one request to the
next.

In 5.2, your bug is that all users see the data bleed, because there's
only one instance of your page, and so, only one instance of LoginVO.

Don't use objects with mutable state as the default values for fields.
It causes data to bleed between requests and clients.


On Tue, Mar 1, 2011 at 6:30 PM, Dany <dugt3@hotmail.com> wrote:
> Hi,
>
> I am developing in tapestry 5.2. I have including pages and component but i
> noticed one problem:
>
>        @Property
>        Private LoginVo loginVo;
>
>        @Log
>        @PageLoaded
>        void pageLoaded()
>        {
>                loginVo =new LoginVo();
>        }
>
> <input type="text" t:id="userName" t:type="TextField" t:label="User Name"
> t:value="loginVo.username" t:validate="required"/>
>
> <input type="text" t:id="userName" t:type="TextField" t:label="User Name"
> t:value="loginVo.password" t:validate="required"/>
>
> if we include this value object in the page and initializes in the
> PageLoaded  the page will be render, providing a response to the browser.
>
> we fille up this values with any value for example xxx and yyy and press
> submit.Then if we open a  new browser instance and we call to this page it
> is appear the form with the fields values xxx and yyy even. I test this
> behabiour in diferent PC browser with the same result.
>
> In tapestry 5.2 we have a sigleton page and not pooled pages but the session
> can not be share with the rest of user i try to use ResetPaged but it
> doesn´t work finally and setup tapestry for the used of pooled pages.
>
> I check it the same example in tapestry 5.1.5 and this it work fine. If you
> call with diferent browser intances the fields are null even if you
> initializes the values in a instance browser.
>
> Is this a bug in tapestry 5.2 or has to be used in a diferent way??
> In which method i have to initializes the POJO´s attribubes?
>
> Any help will be welcome. Thanks in advance.
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-2-Request-data-shared-in-different-client-browser-tp3405994p3405994.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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Mime
View raw message