Looks like you are on the right track.

It's simplified between T4 and T5.

In T4 you had to come up with a global name for your ASO, and provide
a HiveMind contribution to define how to instantiate it (as well as
scope).

In T5 we've done away with the name, and use the class name as the
'key'.  And there's no need to configuration anything in most cases
(unless you want to change how the ASO gets instantiated, or what its
scope is).

Don't get worked up about the filter vs. servlet issue; the
application scope is the same (i.e., until the WAR is undeployed or
redeployed).

Also, I would avoid the term "Visit" unless that really does it for
you; back in T3 days you just had the Visit, not the plethora of ASOs
now possible.  But I was never happy with the name!  Under T4, it was
awkward to have an ASO named Visit because there was a holdover method
on pages, from T3, named getVisit().

On 4/6/07, Bruce Petro <[EMAIL PROTECTED]> wrote:
Actually, I have (of course, right after I ask the world!) found this
which helps. But if anyone can share more I'd appreciate it.

http://tapestry.apache.org/tapestry5/tapestry-core/guide/request.html



-----Original Message-----
From: Bruce Petro [mailto:[EMAIL PROTECTED]
Sent: Friday, April 06, 2007 11:31 AM
To: Tapestry users
Subject: T4/T5 and Session/Visit

OK, I'm new but trying to learn this stuff...  As I understand it:

T4 exists within servlet lifespan / T5 utilizes Filter and therefore is
outside the servlet lifespan.

Therefore I believe various things in T4 such as getting to the session
will have to be handled differently.

Is that correct?  I have a fair understanding of servlet work, but very
little about the context a filter has.

Is there any summary of the contextual differences anywhere?

Not so much the simple syntax changes in the html, but an overview of
the contextual and architectural changes.

A nice overview of the differences/similarities might be very helpful
right now.

If some of this exists please let me know.



But to ask a more-simple basic question - how in T5 do we create and
access a session specific Visit object?  Is it simply defining something
like this in the start page:

@ApplicationState

private Visit thisVisit;

And then defining the same @ApplicationState variable in each page
needing it?



Thanks for any answers you can spare!






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to