on 6/13/01 1:12 PM, "Gary Lawrence Murphy" <[EMAIL PROTECTED]> wrote:

> Nothing urgent, just a minor bit of fuzziness in
> TurbineVelocityService:
> 
>   This is a Service that can process Velocity templates from
>   within a Turbine Screen.  Here's an example of how you might
>   use it from a screen:
> 
>   Context context = TurbineVelocity.getContext(data);
>   context.put("message", "Hello from Turbine!");
>   String results = TurbineVelocity.handleRequest(context,"helloWorld.vm");
>   data.getPage().getBody().addElement(results);
> 
> This is a nice example, but confusing since it is sitting in a class
> api doc for a class that is not mentioned in the example ;) The same
> example does appear in TurbineVelocity, so where does
> TurbineVelocityService fit into this picture?

TurbineVelocity is the helper abstract static class that wraps around
TurbineVelocityService so that you don't need to use the ServiceBroker in
order to get an instance of the service.

Ie: It prevents you from having to type this all the time...

        (VelocityService)TurbineServices
            .getInstance().getService(VelocityService.SERVICE_NAME);

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Ballmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to