cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: JXTemplate and Woody
Date Tue, 25 Nov 2003 21:26:49 GMT
Yes they do, i am being braindead. Sorry.

-Brian

On Tuesday, November 25, 2003, at 08:09 AM, Reinhard Poetz wrote:

>
> From: Brian McCallister
>
>> On Tuesday, November 25, 2003, at 03:40 AM, Reinhard Poetz wrote:
>>>
>>> Hmmm, I can't tell you why this doesn't work as expected for you but
>>> why
>>> don't you pass the objects using
>>>
>>>   cocoon.sendPage( "myPipeline", {user : user} );
>>>
>>
>> I may be wrong, but doesn't that put the user into the
>> request scope? I
>> use a lightweight "Employee" object as a token (really a token
>> container as it is full of keys) for logged in users. I would
>> prefer to
>> avoid having to re-query for it every time.
>
> Yes, you are right. On the other hand you can do something like
>
>
> var user;
>
> function login() {
>    user = new User();
> }
>
> function myFunc() {
>    cocoon.sendPage( "myPipeline", {user : user} );
> }
>
>
> Doing it this way you don't need the session as data container because
> global variables are available (by reference) within all scripts of
> *one* sitemap. This should also mean that you your persistence layer 
> (in
> your case OJB, isn't it ;-) is not queried any more.
>
> Concerning the request object: I think you're right but as you only 
> deal
> with references the overhead is very small and the persistence layer is
> not re-queried. The advantage of this is more explicit code because of 
> a
> clear flow <--> view contract.
>
> ... but of course a matter of taste.
>
> --
> Reinhard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>



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


Mime
View raw message