You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Didier Frund <di...@swissinfo.org> on 2005/01/26 18:09:44 UTC

fetch the Visit object

Hello,

I'm a very beginner in Tapestry.

Is it possible to fetch the Visit object of the session from another 
class than a page or a component ?

For example:

public class Foo{
   
   Visit visit;

    public Foo(){

       // asign the Visit object of the session to the visit
       // member of this class without passing  it by parameter
   
    }
}

Thanks a lot


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


Re: fetch the Visit object

Posted by Nick Stuart <ba...@gmail.com>.
It may be, but I think that would be considered bad practice as you
are possibly tying the presentation layer with logic layer. Best bet
would be just access the visit object from a page/component and pass
it in to where ever its needed.

Any one else have thoughts for this?
-Nick


On Wed, 26 Jan 2005 18:09:44 +0100, Didier Frund
<di...@swissinfo.org> wrote:
> Hello,
> 
> I'm a very beginner in Tapestry.
> 
> Is it possible to fetch the Visit object of the session from another
> class than a page or a component ?
> 
> For example:
> 
> public class Foo{
> 
>    Visit visit;
> 
>     public Foo(){
> 
>        // asign the Visit object of the session to the visit
>        // member of this class without passing  it by parameter
> 
>     }
> }
> 
> Thanks a lot
> 
> ---------------------------------------------------------------------
> 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