velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Colson <>
Subject VelocityFormatter and other tools
Date Tue, 01 Jul 2003 19:01:57 GMT
Say folks -
  I've been around for a while, but didn't realize there is a
VelocityFormatter class in the core that has some format functionality.

The only docs seem to be javadoc right now, and one of the archive posts
seems to indicate that this class should move over into the Tools area.

Before posing anything for the velocity-developers, I'm interest in some
user feedback on this feature.

Do you use this formatter?
How did you find out about it?
Did you know it has a nifty little Alternator method?

Would it cause a lot of pain if this class was removed from the core and
placed into the tools package?

Assuming somebody (like me) were to write up documentation, what do you
think of the format Gabriel used here:

Too technical? Just right?

Would you find it useful to have separate User and Developer guides for

Also just curious, would you prefer a tool that 'acts upon a data
item' or a wrapper that 'wraps the data item'?
Ex. Using a tool that acts on a data item
context.put("formatTool", new VelocityFormatter());
context.put("start_date", record.getStartDate());


Or using a wrapper called Formatter...
context.put("start_date", new Formatter(record.getStartDate()) );

$start_date = which defaults to getShortDate(), or whatever the
Formatter.setDefaultFormat(SimpleDateFormat.SHORT) is set to
$start_date.LONG() = which calls getLONG()
$start_date.xxxx = which calls whatever additional stuff the formatter can


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message