You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Cosmin Bucur <co...@myorthodontist.ca> on 2005/11/22 22:00:26 UTC

How are the Page objects held on the server

I wanted to know if there's a pool of page objects which are used whenevevr 
needed , or if , when a page object is accesed by a user , it gets 
associated with that user's session on the server , therefore variables 
stored by the user on a page would be available to the user later through 
that same page ? 


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


Re: How are the Page objects held on the server

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
ah now i get it , so page properties can be persisted in a transparent way 
through HttpSession allthough the page is kept in a pool ... never knew that 
, and don't know much about anotations but i will investigate

thanks ,
cosmin
----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, November 22, 2005 4:14 PM
Subject: Re: How are the Page objects held on the server


Tapestry maintains an illusion that there's a direct connection
between individual users and particular page instances ... but its
really a shell game.  Persistent properties (marked with the @Persist
annotation) have their values stored in the HttpSession between
requests.  On each request, an *equivalent* (but not identical) page
object is obtained from the pool, and has its properites rewound from
data in the HttpSession.

At the end of the request, all transient and persistent properties are
reset to default values and the page goes back into the pool for later
reuse by the same, or different, client.

All the business with abstract properties and such is so that Tapestry
can write the tedious code that manages those properties, including
various kinds of notifications and cleanups.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> I wanted to know if there's a pool of page objects which are used 
> whenevevr
> needed , or if , when a page object is accesed by a user , it gets
> associated with that user's session on the server , therefore variables
> stored by the user on a page would be available to the user later through
> that same page ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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




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


Re: How are the Page objects held on the server

Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
Multiple components, for instance two jwcid="@MyComp" are given unique names 
internally, you are advised to prefix such components to improve resulting 
url length and such, but it is not requried. Prefix example: 
jwcid=prefix@MyComp.

The persistent property is tied to the instance so jwcid=one@MyComp and and 
jwcid=two@MyComp will each have their own property instance.

"Cosmin Bucur" <co...@myorthodontist.ca> skrev i en meddelelse 
news:002d01c5efe0$dbac44a0$6400a8c0@alpha...
> Does this work only with pages ? What about components ? And what if you 
> have more components of the same kind , rendered on a page through say a 
> ForEach ? Could those components have @Persist -ent parameters ?
>
> Cosmin
> ----- Original Message ----- 
> From: "Howard Lewis Ship" <hl...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 4:14 PM
> Subject: Re: How are the Page objects held on the server
>
>
> Tapestry maintains an illusion that there's a direct connection
> between individual users and particular page instances ... but its
> really a shell game.  Persistent properties (marked with the @Persist
> annotation) have their values stored in the HttpSession between
> requests.  On each request, an *equivalent* (but not identical) page
> object is obtained from the pool, and has its properites rewound from
> data in the HttpSession.
>
> At the end of the request, all transient and persistent properties are
> reset to default values and the page goes back into the pool for later
> reuse by the same, or different, client.
>
> All the business with abstract properties and such is so that Tapestry
> can write the tedious code that manages those properties, including
> various kinds of notifications and cleanups.
>
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
>> I wanted to know if there's a pool of page objects which are used 
>> whenevevr
>> needed , or if , when a page object is accesed by a user , it gets
>> associated with that user's session on the server , therefore variables
>> stored by the user on a page would be available to the user later through
>> that same page ?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
> 




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


Re: How are the Page objects held on the server

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
Thanks , now I'm starting to get it . Also got the annotations to work , 
first time I use such things , great stuff !

Cosmin
----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, November 23, 2005 9:42 AM
Subject: Re: How are the Page objects held on the server


Using a For component will render the *same* component multiple times
so you will need to do something else to handle that situation.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> Does this work only with pages ? What about components ? And what if you
> have more components of the same kind , rendered on a page through say a
> ForEach ? Could those components have @Persist -ent parameters ?
>
> Cosmin
> ----- Original Message -----
> From: "Howard Lewis Ship" <hl...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 4:14 PM
> Subject: Re: How are the Page objects held on the server
>
>
> Tapestry maintains an illusion that there's a direct connection
> between individual users and particular page instances ... but its
> really a shell game.  Persistent properties (marked with the @Persist
> annotation) have their values stored in the HttpSession between
> requests.  On each request, an *equivalent* (but not identical) page
> object is obtained from the pool, and has its properites rewound from
> data in the HttpSession.
>
> At the end of the request, all transient and persistent properties are
> reset to default values and the page goes back into the pool for later
> reuse by the same, or different, client.
>
> All the business with abstract properties and such is so that Tapestry
> can write the tedious code that manages those properties, including
> various kinds of notifications and cleanups.
>
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> > I wanted to know if there's a pool of page objects which are used
> > whenevevr
> > needed , or if , when a page object is accesed by a user , it gets
> > associated with that user's session on the server , therefore variables
> > stored by the user on a page would be available to the user later 
> > through
> > that same page ?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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




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


Re: How are the Page objects held on the server

Posted by Howard Lewis Ship <hl...@gmail.com>.
Using a For component will render the *same* component multiple times
so you will need to do something else to handle that situation.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> Does this work only with pages ? What about components ? And what if you
> have more components of the same kind , rendered on a page through say a
> ForEach ? Could those components have @Persist -ent parameters ?
>
> Cosmin
> ----- Original Message -----
> From: "Howard Lewis Ship" <hl...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 4:14 PM
> Subject: Re: How are the Page objects held on the server
>
>
> Tapestry maintains an illusion that there's a direct connection
> between individual users and particular page instances ... but its
> really a shell game.  Persistent properties (marked with the @Persist
> annotation) have their values stored in the HttpSession between
> requests.  On each request, an *equivalent* (but not identical) page
> object is obtained from the pool, and has its properites rewound from
> data in the HttpSession.
>
> At the end of the request, all transient and persistent properties are
> reset to default values and the page goes back into the pool for later
> reuse by the same, or different, client.
>
> All the business with abstract properties and such is so that Tapestry
> can write the tedious code that manages those properties, including
> various kinds of notifications and cleanups.
>
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> > I wanted to know if there's a pool of page objects which are used
> > whenevevr
> > needed , or if , when a page object is accesed by a user , it gets
> > associated with that user's session on the server , therefore variables
> > stored by the user on a page would be available to the user later through
> > that same page ?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: How are the Page objects held on the server

Posted by Howard Lewis Ship <hl...@gmail.com>.
Works with components just exactly the same.  Each component instance
within a page will store its properties individually. Basically, the
HttpSession attribute name includes the name of the page, property,
and the component's page-unique id.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> Does this work only with pages ? What about components ? And what if you
> have more components of the same kind , rendered on a page through say a
> ForEach ? Could those components have @Persist -ent parameters ?
>
> Cosmin
> ----- Original Message -----
> From: "Howard Lewis Ship" <hl...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 4:14 PM
> Subject: Re: How are the Page objects held on the server
>
>
> Tapestry maintains an illusion that there's a direct connection
> between individual users and particular page instances ... but its
> really a shell game.  Persistent properties (marked with the @Persist
> annotation) have their values stored in the HttpSession between
> requests.  On each request, an *equivalent* (but not identical) page
> object is obtained from the pool, and has its properites rewound from
> data in the HttpSession.
>
> At the end of the request, all transient and persistent properties are
> reset to default values and the page goes back into the pool for later
> reuse by the same, or different, client.
>
> All the business with abstract properties and such is so that Tapestry
> can write the tedious code that manages those properties, including
> various kinds of notifications and cleanups.
>
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> > I wanted to know if there's a pool of page objects which are used
> > whenevevr
> > needed , or if , when a page object is accesed by a user , it gets
> > associated with that user's session on the server , therefore variables
> > stored by the user on a page would be available to the user later through
> > that same page ?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: How are the Page objects held on the server

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
Does this work only with pages ? What about components ? And what if you 
have more components of the same kind , rendered on a page through say a 
ForEach ? Could those components have @Persist -ent parameters ?

Cosmin
----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, November 22, 2005 4:14 PM
Subject: Re: How are the Page objects held on the server


Tapestry maintains an illusion that there's a direct connection
between individual users and particular page instances ... but its
really a shell game.  Persistent properties (marked with the @Persist
annotation) have their values stored in the HttpSession between
requests.  On each request, an *equivalent* (but not identical) page
object is obtained from the pool, and has its properites rewound from
data in the HttpSession.

At the end of the request, all transient and persistent properties are
reset to default values and the page goes back into the pool for later
reuse by the same, or different, client.

All the business with abstract properties and such is so that Tapestry
can write the tedious code that manages those properties, including
various kinds of notifications and cleanups.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> I wanted to know if there's a pool of page objects which are used 
> whenevevr
> needed , or if , when a page object is accesed by a user , it gets
> associated with that user's session on the server , therefore variables
> stored by the user on a page would be available to the user later through
> that same page ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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




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


Re: How are the Page objects held on the server

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
I see thanks ...
so i guess i have to rely on the state objects allthogh i wanted to keep a 
state for each page visited by a certain user .

Cosmin
----- Original Message ----- 
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, November 22, 2005 4:14 PM
Subject: Re: How are the Page objects held on the server


Tapestry maintains an illusion that there's a direct connection
between individual users and particular page instances ... but its
really a shell game.  Persistent properties (marked with the @Persist
annotation) have their values stored in the HttpSession between
requests.  On each request, an *equivalent* (but not identical) page
object is obtained from the pool, and has its properites rewound from
data in the HttpSession.

At the end of the request, all transient and persistent properties are
reset to default values and the page goes back into the pool for later
reuse by the same, or different, client.

All the business with abstract properties and such is so that Tapestry
can write the tedious code that manages those properties, including
various kinds of notifications and cleanups.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> I wanted to know if there's a pool of page objects which are used 
> whenevevr
> needed , or if , when a page object is accesed by a user , it gets
> associated with that user's session on the server , therefore variables
> stored by the user on a page would be available to the user later through
> that same page ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


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


Re: How are the Page objects held on the server

Posted by Howard Lewis Ship <hl...@gmail.com>.
Tapestry maintains an illusion that there's a direct connection
between individual users and particular page instances ... but its
really a shell game.  Persistent properties (marked with the @Persist
annotation) have their values stored in the HttpSession between
requests.  On each request, an *equivalent* (but not identical) page
object is obtained from the pool, and has its properites rewound from
data in the HttpSession.

At the end of the request, all transient and persistent properties are
reset to default values and the page goes back into the pool for later
reuse by the same, or different, client.

All the business with abstract properties and such is so that Tapestry
can write the tedious code that manages those properties, including
various kinds of notifications and cleanups.

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> I wanted to know if there's a pool of page objects which are used whenevevr
> needed , or if , when a page object is accesed by a user , it gets
> associated with that user's session on the server , therefore variables
> stored by the user on a page would be available to the user later through
> that same page ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: How are the Page objects held on the server

Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
The old 3.0 user manuals explain that I believe, anyway as I understand it

Properties can be persistent, which means that they will be tied to a 
session and be available across multiple requests by the same user.
A property can be defined for page/component as us like in the 
specification.

The property isn't bound to the page but rather to the session. When a page 
is activated the persistent properties are tied to the page. Once the 
request has completed the tie is broken and the page is returned to a pool 
ready to be used by any session.

To you as an application programmer though, it will appear as if there is a 
page object in memory, which remembers the persistent properties.

Henrik

"Cosmin Bucur" <co...@myorthodontist.ca> skrev i en meddelelse 
news:002b01c5efa7$c4189750$6400a8c0@alpha...
>I wanted to know if there's a pool of page objects which are used whenevevr 
>needed , or if , when a page object is accesed by a user , it gets 
>associated with that user's session on the server , therefore variables 
>stored by the user on a page would be available to the user later through 
>that same page ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
> 




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


RE: How are the Page objects held on the server

Posted by Patrick Casey <pa...@adelphia.net>.
	Given a set of n sessions. There will always be between 0 and n
instances of any give page to service them.

	There is no guarantee that if session A is services by page B on
request C, that it won't be services by page P, Q, or R on request D, E, or
F.

	--- pat

> -----Original Message-----
> From: Cosmin Bucur [mailto:cosmin@myorthodontist.ca]
> Sent: Tuesday, November 22, 2005 1:00 PM
> To: Tapestry users
> Subject: How are the Page objects held on the server
> 
> I wanted to know if there's a pool of page objects which are used
> whenevevr
> needed , or if , when a page object is accesed by a user , it gets
> associated with that user's session on the server , therefore variables
> stored by the user on a page would be available to the user later through
> that same page ?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




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