cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gentry, Michael \(Contractor\)" <>
Subject RE: Tapestry tutorial advice
Date Thu, 08 Jun 2006 19:29:53 GMT
Doing the <inject/> is fine for smaller applications (examples), but
isn't as nice when you have a lot of pages.  I tried making a
base/superclass page and putting the <inject/> in it, but that doesn't
inherit.  I have to admit I still don't fully understand the craze over
injection/etc.  I have no problems with asking my framework for the
session and it providing it to me using subclassing.  The solution I
came up with is much more convoluted.


-----Original Message-----
From: Eric Schneider [] 
Sent: Thursday, June 08, 2006 2:28 PM
Subject: Re: Tapestry tutorial advice


We're still using 1.4, so this is how we do it.

Create a class, like (with a DataContext instance
variable).   In the <appname>.application file you add the following

<meta key="org.apache.tapestry.visit-class"


public abstract Object getSession();


<inject property="session" type="state" object="visit"/>

I think that's it.


On 6/8/06, Andrus Adamchik <> wrote:
> I am reworking Cayenne tutorials for 1.2 final release. Since I
> haven't used Tapestry for almost a year, and totally missed on 4.0, I
> wanted to get some feedback from Cayenne/Tapestry users. What are the
> good ways to bind DataContext to a session?
> Current example puts it in the visit. I would personally use a
> regular web app setup with Cayenne filter (making Tapestry app just
> another web app case as far as Cayenne is concerned). I wonder what
> others are doing in this respect? Any HiveMind magic?
> Andrus

View raw message