You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Daniel Rall <dl...@finemaltcoding.com> on 2001/09/16 20:28:03 UTC

TurbinePullService.populateContext()

In 3.0, the populateContext() method looks like the following:

TurbinePullService {

    public void populateContext(TemplateContext context, RunData data)
    {
        populateWithRequestTools(context, data);

        // session tools (whether session-only or persistent are
        // very similar, so the same method is used - the
        // boolean parameter indicates whether get/setPerm is to be used
        // rather than get/setTemp)
        User user = data.getUser();
        if (user != null)
        {
            populateWithSessionTools(sessionTools, context, user, false);

            if (user.hasLoggedIn())
            {
                populateWithSessionTools(persistentTools, context, user, true);
            }
        }
    }

}


In 2.0, user.hasLoggedIn() does not gate population of the context
with session tools from the User's permanent storage (so it always
happens).

Are both these implementations correct for their respective versions,
or is a modification to one of them in order?


                                Daniel

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


Re: TurbinePullService.populateContext()

Posted by Sean Legassick <se...@informage.net>.
In message <m3...@despot.finemaltcoding.com>, Daniel Rall 
<dl...@finemaltcoding.com> writes
>In 2.0, user.hasLoggedIn() does not gate population of the context
>with session tools from the User's permanent storage (so it always
>happens).
>
>Are both these implementations correct for their respective versions,
>or is a modification to one of them in order?

Looks to me as though 2.x should work as 3.0, no point populating with 
persistent tools for a non-logged in user.

-- 
Sean Legassick
sean@informage.net
         Je suis un homme: rien d'humain en m'est étranger

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