> When this happens, the template can't find the tool so it 
> just displays:
> $something.getStage() rather than the result of the method.

This is not always true.  If $something.getStage() returns null, you will
get the same result.  The best way to test if the tool is in context is to
just use the tool name, $something, in a template.  Velocity will
automatically call the toString() method of the tool and more than likely
you will see the object id of the tool.  If you just see "$something" then
you know your tool is not being loaded.

Also, for session tools (i'm almost positive) you must have a user in the
session.  That means your log-in function will have to do a
RunData.setUser(user) and RunData.save() to save the use into the session.
At this point the context should have access to the session tool.

hth,
Scott



> -----Original Message-----
> From: Edward Armitage [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 21, 2002 5:17 PM
> To: Turbine Users List
> Subject: Session-scope Pull Service Probs.
> 
> 
> I am using Turbine 2.1 and have problems accessing a pull service from
> my velocity template.  The relevant part of my
> TurbineResources.properties looks like this:
> 
> tool.session.something=org.keyfort.sell.tools.PSTool
> 
> In my template I have:
> 
> $something.getStage()
> 
> When this happens, the template can't find the tool so it 
> just displays:
> $something.getStage() rather than the result of the method.  If I set
> the tool as global-scope or request-scope in 
> TurbineResources.properties
> it works find.
> 
> Any help greatly appreciated.
> 
> Ed
> 
> 
> ______________________________________________________________
> __________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service. For more information on a proactive anti-virus 
> service working
> around the clock, around the globe, visit http://www.messagelabs.com
> ______________________________________________________________
> __________
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to