On Fri, 03 Nov 2000, you wrote:
>Yes there are some problems with the context,
> I might find them as I am trying to get Torque to work with
> Velocity and I am getting some weird behaviour. What are
> you seeing?
The main problem I ran into with the formatter is that it just didn't
work. I think it has to do with how you pass a reference to the context
- not sure though.
Example....
// in the Servlet
VelocityFormatter formatter = new VelocityFormatter( ctx )
context.put( "formatter", formatter )
// Then in the template
$formatter.makeAlternator("rowcolor", "#c6c6c6", "#eeeeee")
$rowcolor.alternate()
"rowcolor" gets added to the context via the internal reference ( passed in
the constructor ). Velocity just doesn't see rowcolor. I don't know if
this is a problem because it's added in the template or not. I need to
investigate more!
Along the line of tools, I've been thinking of using an XML structured
configuration file for adding tools to the context. I guess you could say
that the configuration would be similar to JSP. I just think that using XML
for the configuration file adds way more flexiblity.
--
Dave Bryson
[EMAIL PROTECTED]
----------------------