on 5/10/2000 2:13 PM, dave bryson <[EMAIL PROTECTED]> wrote:

> This is how I'm stuffing the temp hashtable into the TemplateInfo.
> 
> <code snip>
> public class TemplateInfo
> {
> private RunData data = null;
> private Hashtable tempStorage = null;
> 
> public TemplateInfo(RunData data)
> {
> this.data=data;
> tempStorage=data.getUser().getTempStorage();
> }
> </code snip>
> 
> Is this what you had in mind?

Close, but lets remove the getUser() from there. See, the problem is that in
the current setup, we *require* that a valid User object exists and hence
the recent NPE's that people have been having.

Essentially, we want to have a way of passing information around the
template systems (ie: the WMContext object) without having to depend on a
valid User object existing.

public class TemplateInfo
{
    private Hashtable  tempStorage = null;
    public TemplateInfo(RunData data)
    {
        tempStorage = new Hashtable();
    }
}

Since TemplateInfo won't be used outside of internal stuff, this shouldn't
cause much confusion for people because they won't see this. I would
normally say to put this into the GlobalCache, except this is a per-request
situation.

-jon


-- 
    Java Servlet Based - Open Source  |        Collab.Net
        Bug/Issue Tracking System     |   now hiring smart people
       <http://scarab.tigris.org/>    |  <http://Collab.Net/jobs/>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to