Re: Velocity EOL Versions?

2020-12-21 Thread Nathan Bubna
The direct answer is that there are no technically EOL versions of Velocity. But that's not really a meaningful answer, as the question kind of assumes that we're more organized/official than we are. We're just not that big or fast moving of a project. Things change only very slowly around here,

Re: Problems with commons-beanutils-1.9.4

2020-02-05 Thread Nathan Bubna
Thanks for drilling into that, Chris! I was reading, but have no time to help with such things right now. I imagine the beanutils folks made that change as a security fix. Probably time for us to deprecate/kill the setClass option, if it's unreliable. Any chance you're up for that? On Wed, Feb 5,

Re: OS

2019-04-18 Thread Nathan Bubna
It runs everywhere Java runs, and Java runs pretty much everywhere. I haven't personally run it on Windows Server 2019, but i'm certain it does run there. On Wed, Apr 17, 2019 at 10:40 PM liname...@outlook.com < liname...@outlook.com> wrote: > Hello, I am doing an investigation. > Does Windows

Re: Online Velocity Template Tester

2017-11-01 Thread Nathan Bubna
I'm not aware of anything out there in the public like that, though that is a great idea! On Wed, Nov 1, 2017 at 5:45 AM, jmeter tea wrote: > I didn't find any Online Velocity Template Tester > > It should be useful also to check template from different velocity > versions,

Re: [tools 2.0] ValueParser.getStrings splits on comma?

2017-08-22 Thread Nathan Bubna
Yeah, that's not ideal. You can configure the string delimiter in your tool config. But this seems like surprising behavior for a ParameterTool to have. The dangers of inheritance, i think. ConversionTool and ValueParser are both built with formats in mind where it makes sense to watch for

Re: [tools] Problems using struts.MessageTool

2016-01-28 Thread Nathan Bubna
Yeah, MessageTool wouldn't make a transformation like that. Pretty sure this is a Struts issue. Good luck! :) On Wed, Jan 27, 2016 at 11:25 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > All, > > Using Velocity-Tools 2.0. > > I've got a resource bundle with the following

Re: Intercepting #set

2015-11-06 Thread Nathan Bubna
used, at least. > Unfortunately I don't find a way to intercept something like > #set($var="whatever"). So I assume I will have to parse the vm file > manually searching for #set occurrences? > > Kind regards > Paul Wellner Bou > > On Thu, Nov 5, 2015 at 8:57 PM,

Re: Strings

2015-03-10 Thread Nathan Bubna
Velocity doesn't like either. I will ask the Solr folks, as you've suggested. Philippe Le 10 mars 2015 à 19:27, Nathan Bubna nbu...@gmail.com a écrit : It's fine to use String methods on String variables. The question is whether $params.q is still a String variable after your change

Re: Strings

2015-03-10 Thread Nathan Bubna
examples tomorrow morning when I am back at work. Philippe Le 10 mars 2015 à 20:47, Nathan Bubna nbu...@gmail.com a écrit : When you say doesn't like either, what do you mean? How can you tell it isn't working? What output do you get? On Tue, Mar 10, 2015 at 12:18 PM, Philippe de Rochambeau

Re: Strings

2015-03-10 Thread Nathan Bubna
It's fine to use String methods on String variables. The question is whether $params.q is still a String variable after your change. And for that, you may have to ask the Solr folks... On Tue, Mar 10, 2015 at 10:56 AM, Philippe de Rochambeau phi...@free.fr wrote: Hello, I have written a vm

Re: multiple regions in 2-phase layout render views

2015-03-06 Thread Nathan Bubna
/44fd09e730d08ab44dfb On 3 March 2015 at 01:10, Nathan Bubna nbu...@gmail.com wrote: Chris, The attached was not attached. :) Can you put it in a gist or something? -nathan On Fri, Feb 27, 2015 at 1:56 AM, Christopher Townson christopher.town...@gmail.com wrote: Hi, I have an app

Re: multiple regions in 2-phase layout render views

2015-03-02 Thread Nathan Bubna
Chris, The attached was not attached. :) Can you put it in a gist or something? -nathan On Fri, Feb 27, 2015 at 1:56 AM, Christopher Townson christopher.town...@gmail.com wrote: Hi, I have an app that is using Velocity with a 2-phase layout render (using Spring VelocityLayoutView in this

Re: Functions

2015-02-19 Thread Nathan Bubna
(shaking his head) please use a tool object, if at all possible. using macros as functions gives me the willies. :) they're meant to clean/simplify repetition of content. just because they can be used as functions, doesn't mean they should be. things can get ugly down that road. :) On Thu, Feb

Re: velocimacro.library - all specified required?

2015-01-14 Thread Nathan Bubna
if the velocimacro’s specified don’t exist, not just a warning alas. Erik On Jan 14, 2015, at 3:10 PM, Nathan Bubna nbu...@gmail.com wrote: On Fri, Jan 9, 2015 at 6:59 AM, Erik Hatcher erik.hatc...@gmail.com wrote: I’m trying to set up a system that has some built-in (to a JAR, class path

Re: Standalone pages

2014-10-09 Thread Nathan Bubna
The VelocityTools project provides several servlets that make it easy to serve up dynamic Velocity pages. http://velocity.apache.org/tools/devel/ On Thu, Oct 9, 2014 at 6:56 AM, Logan Stinger lstin...@bluelid.com wrote: It depends on the contents of your velocity file. If your velocity file

Re: velocity eclipse plugins, VTL grammar, XText

2014-09-25 Thread Nathan Bubna
Sounds like a good idea. I don't personally use Eclipse, so it wouldn't be of use to me, unfortunately. On Thu, Sep 25, 2014 at 4:07 AM, Christopher Townson christopher.town...@gmail.com wrote: Hi all, I've long thought that the Velocity could do with a better editor plugin for Eclipse. I

Re: [tools] Toolbox preventing session serialization

2014-03-11 Thread Nathan Bubna
The Configuring section in the upgrade doc describes how to turn off the default tools. http://velocity.apache.org/tools/releases/2.0/upgrading.html And yeah, a transient logger implementation sounds reasonable, but i honestly haven't used or looked at this code in years, so it's hard to be

Re: [tools] Using java.text.MessageFormat in templates

2014-02-21 Thread Nathan Bubna
Yes, the conflict was intentional. The idea was that people using VelocityStruts would default to using Struts' message support, so we should default $text to use that. Whether that is still valid reasoning, i don't know. I haven't used Struts in a very, very long time. On Fri, Feb 21, 2014 at

Re: [tools] Using java.text.MessageFormat in templates

2014-02-21 Thread Nathan Bubna
you can use it in any scope: http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/SafeConfig.html On Fri, Feb 21, 2014 at 10:58 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 2/21/14, 1:42 PM, Nathan Bubna wrote: Yes, the conflict

Re: Iterator Tool

2013-12-02 Thread Nathan Bubna
http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/LoopTool.html On Mon, Dec 2, 2013 at 12:29 PM, Mike Clovis m...@trifecta.com wrote: In that Iterator Tool is deprecated, what class and code is now supported to accomplish the same things?

Re: Reloading velocity macros

2013-11-08 Thread Nathan Bubna
Unfortunately, this is a known bug: https://issues.apache.org/jira/browse/VELOCITY-710 On Tue, Oct 29, 2013 at 11:57 PM, Greg Huber gregh3...@gmail.com wrote: Hello, I am using the reloading macros in a tomcat environment, which is working great, but when I add a new macro I seem to have to

Re: foreach with XMLTool

2013-10-02 Thread Nathan Bubna
Hmm. Sounds less than ideal. I don't have time to improve how the XMLTool handles this, but if you're up for filing a bug and perhaps even contributing a patch, that'd be great. :) On Wed, Oct 2, 2013 at 11:05 AM, Ralph Goers ralph.go...@dslextreme.com wrote: I found that the problem isn't in

Re: Unexpected template parsing issue

2013-08-30 Thread Nathan Bubna
Ick. I've no idea what's happening here. Filing a bug report with a test case would be appreciated. In the meantime, the best i can do is point out that #*whitespace*# is the more common technique for exercising complete whitespace control. There are fewer complications with multi-line

Re: What does Velocimacro with a Body mean?

2013-08-07 Thread Nathan Bubna
() I don't know what is happening to trim() function i.e. why it is not working. But thank you for answering my question. O. O. - Messaggio originale - Da: Nathan Bubna nbu...@gmail.com A: Velocity Users List user@velocity.apache.org; O. Olson olson_...@yahoo.it Cc: Inviato: Lunedì

Re: What does Velocimacro with a Body mean?

2013-08-05 Thread Nathan Bubna
Yes, all velocimacros have bodies in their definition: #macro( foo ) definition only #end #macro( bar ) definition accepts $bodyContent #end Not all velocimacros accept bodies in their usage: #foo() #@bar() body content when used #end Produces: definition only definition accepts

Re: In VTL, simply reverse a list with java.util.Collection static method

2013-05-06 Thread Nathan Bubna
http://velocity.apache.org/engine/devel/developer-guide.html#supportforstaticclasses On Mon, May 6, 2013 at 12:15 PM, Travis P allotro...@gmail.com wrote: Via web searching, I've found quite a few people reversing lists by writing out loops. Seems to me, we should be able to something like:

Re: Tools and Sessions

2013-04-14 Thread Nathan Bubna
It's because by default it avoids session creation, passing in the result of request.getSession(false). You can configure your session toolbox to pass true and create sessions. See the examples at: http://velocity.apache.org/tools/devel/config.html (which i just noticed are all misformated.

Re: runtime.parser.Parser maintains multiple VelocityCharStreams?

2013-04-12 Thread Nathan Bubna
I've no idea. I've never really dug into those much. If Jarkko is kicking around, he might know. On Fri, Apr 12, 2013 at 10:41 AM, Christopher Schultz ch...@christopherschultz.net wrote: All, I've been doing some profiling looking for wasted memory in my webapp and I've discovered that

Re: Problems finding template

2013-02-19 Thread Nathan Bubna
http://velocity.apache.org/engine/devel/developer-guide.html#Configuring_Resource_Loaders On Tue, Feb 19, 2013 at 3:41 PM, Garey Mills gmi...@library.berkeley.edu wrote: Hello - I am writing a web app that starts a thread to perform some operations that take too much time to require the

Re: Simple list of all methods, properties, variables available to templates?

2013-02-16 Thread Nathan Bubna
here. Much appreciated, will figure it out from source. If you can get your hands on the current VelocityContext, then you could list all the properties it contains (it extends Map). On Tue, Feb 12, 2013 at 12:42 AM, Nathan Bubna nbu...@gmail.com wrote: Velocity doesn't

Re: Simple list of all methods, properties, variables available to templates?

2013-02-13 Thread Nathan Bubna
source. If you can get your hands on the current VelocityContext, then you could list all the properties it contains (it extends Map). On Tue, Feb 12, 2013 at 12:42 AM, Nathan Bubna nbu...@gmail.com wrote: Velocity doesn't provide anything but the syntax. You will have to seek

Re: Simple list of all methods, properties, variables available to templates?

2013-02-11 Thread Nathan Bubna
Velocity doesn't provide anything but the syntax. You will have to seek documentation from Vosao CMS. On Mon, Feb 11, 2013 at 6:57 PM, ANS Developer Team d...@answeb.org wrote: Hi all, I'm trying to find a list all of the above that can be used in a template, preferably with a brief

Re: Is it possible to continue processing instead of throwing a ParseErrorException?

2012-10-03 Thread Nathan Bubna
Velocity uses a JavaCC generated parser. So far as i know, JavaCC doesn't support this kind of soft-fail parsing. On Wed, Oct 3, 2012 at 12:27 PM, Collin Peters cpet...@intouchfollowup.com wrote: Just wondering if it is possible to skip bad merge fields and just have it try to continue? The

Re: Having trouble doing math with values retrieved from external data source

2012-10-02 Thread Nathan Bubna
64113 816-926-8819 (W) -Original Message- From: Nathan Bubna [mailto:nbu...@gmail.com] Sent: Tuesday, October 02, 2012 10:47 AM To: Velocity Users List Subject: Re: Having trouble doing math with values retrieved from external data source Glad it worked for you. If you're

Re: Macro caching and other caching

2012-07-31 Thread Nathan Bubna
= org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader velocimacro.permissions.allow.inline.local.scope = true Thanks! Bradley On Mon, Jul 30, 2012 at 4:47 PM, Nathan Bubna nbu...@gmail.com wrote: On Mon, Jul 30, 2012 at 1:30 PM, Bradley Wagner bradley.wag...@hannonhill.com wrote: Thanks

Re: Macro caching and other caching

2012-07-31 Thread Nathan Bubna
with content: \n + template); return null; } LOG.debug(Velocity successfully evaluted template with content: \n + template); String strResult = writer.getBuffer().toString(); return strResult; On Tue, Jul 31, 2012 at 11:10 AM, Nathan Bubna nbu...@gmail.com wrote: What do you use for logTag

Re: Macro caching and other caching

2012-07-31 Thread Nathan Bubna
with content: \n + template); String strResult = writer.getBuffer().toString(); return strResult; On Tue, Jul 31, 2012 at 11:10 AM, Nathan Bubna nbu...@gmail.com wrote: What do you use for logTag (template name) when you are using evaluate()? On Tue, Jul 31, 2012 at 8:01 AM

Re: Macro caching and other caching

2012-07-30 Thread Nathan Bubna
On Mon, Jul 30, 2012 at 1:30 PM, Bradley Wagner bradley.wag...@hannonhill.com wrote: Thanks for the input. What we're seeing is that Velocity seems to be holding on to a lot of org.apache.velocity.runtime.parser.Token objects (around 5 million). We allow people to write arbitrary Velocity

Re: Odd observation during debugging

2012-07-16 Thread Nathan Bubna
On Mon, Jul 16, 2012 at 9:04 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 7/11/12 1:35 PM, Nathan Bubna wrote: On Wed, Jul 11, 2012 at 9:58 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, ... See VELOCITY-731 and VELOCITY-692 and others

Re: partial evaluation / removing directives

2012-07-13 Thread Nathan Bubna
On Thu, Jul 12, 2012 at 2:27 PM, Pete pete.devn...@gmail.com wrote: Hi all, I'm working with some velocity files where I want to partially evaluate them, such that the only things actually evaluated are #parse (includes of other velocity templates in the same directory) and $references to a

Re: partial evaluation / removing directives

2012-07-13 Thread Nathan Bubna
AM, Nathan Bubna nbu...@gmail.com wrote: On Thu, Jul 12, 2012 at 2:27 PM, Pete pete.devn...@gmail.com wrote: Hi all, I'm working with some velocity files where I want to partially evaluate them, such that the only things actually evaluated are #parse (includes of other velocity

Re: partial evaluation / removing directives

2012-07-13 Thread Nathan Bubna
On Fri, Jul 13, 2012 at 9:02 AM, Alex Fedotov a...@kayak.com wrote: Well, I did not get into the details, but the idea would be to replace the ASTIfStatement with a sequence of AST nodes that would output the #IF text followed by the result of rewriting the children, etc. followed by the #END

Re: Odd observation during debugging

2012-07-11 Thread Nathan Bubna
Just set: directive.if.tostring.nullcheck = false See VELOCITY-731 and VELOCITY-692 and others... On Wed, Jul 11, 2012 at 9:13 AM, Christopher Schultz ch...@christopherschultz.net wrote: All, I recently started getting intermittent OOMEs in my webapp that seem to be completely recoverable.

Re: Odd observation during debugging

2012-07-11 Thread Nathan Bubna
On Wed, Jul 11, 2012 at 9:58 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, ... See VELOCITY-731 and VELOCITY-692 and others... Those were good to read: 1.6 introduced more consistent (if slower) treatment of references and then a setting was added to get the old

Re: Odd observation during debugging

2012-07-11 Thread Nathan Bubna
On Wed, Jul 11, 2012 at 11:05 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 7/11/12 1:35 PM, Nathan Bubna wrote: Actually, i still consider [the toString behavior] correct for a template language (which is not the same as a scripting language) to treat render

Re: double evaluation

2012-07-06 Thread Nathan Bubna
Put the context in the context: context.put(context, context); Then do: $context.get($id).content On Fri, Jul 6, 2012 at 4:49 AM, kieran...@gmx.net wrote: Hello Velocity Users, in our VelocityContext, there is a list called sourceIds, which lists the available ids. In addition, there are

Re: Inconsistent and strange NPE when initializing Velocity

2012-06-27 Thread Nathan Bubna
What are the macro settings in your velocity.properties? On Mon, Jun 25, 2012 at 7:40 PM, Bradley Wagner bradley.wag...@hannonhill.com wrote: We're noticing something now that may or may not be related to our change to only use a single instance of the Velocity Engine. Macros that we define

Re: Inconsistent and strange NPE when initializing Velocity

2012-06-27 Thread Nathan Bubna
: Thanks, Nathan, I'll give that a shot. Offhand, is there anything else I need to be aware of that could be persisting across template renders (like velocimacros) since I'm now using a single instance of engine? On Wed, Jun 27, 2012 at 3:51 PM, Nathan Bubna nbu...@gmail.com wrote: On Wed

Re: Java method that generates html tags is escaping angle brackets...

2012-06-17 Thread Nathan Bubna
This is not a standard behavior. Either your $reportTool class is doing it or else you have the EscapeHtmlReference EventHandler configured. On Sat, Jun 16, 2012 at 11:11 PM, smadirondack smadirond...@gmail.com wrote: From a Velocity template I call a java method that generates html tags  

Re: Problem with static classes and chained contexts

2012-06-11 Thread Nathan Bubna
Yeah, i'd call that a bug. Would you mind filing it in JIRA? As for performance gains, i would operate under the assumption that the gains are small. Yes, you cut down on map puts and short-term memory churn, but each reference insertion has an extra lookup step now. Unless the default context

Re: Is it possible to have velocity ignore certain characters?

2012-06-09 Thread Nathan Bubna
No, the parser is JavaCC-generated and not dynamically modifiable. If you are using a lot of syntax that is like VTL, but is not actually VTL (like your example), either use literals to avoid the syntax conflicts

Re: Added Velocity language parser to CodeMirror

2012-05-19 Thread Nathan Bubna
That looks great! On Sat, May 19, 2012 at 12:11 AM, Steve O'Hara soh...@pivotal-solutions.co.uk wrote: Just a note to say that I've contributed a language parser/colourizer mode for Velocity to the rather excellent free js package CodeMirror http://codemirror.net/ Looks good but if you spot

Re: Added Velocity language parser to CodeMirror

2012-05-19 Thread Nathan Bubna
Oh, one thing it does appear to be missing is body macros: #@foo() this is inner content for \#foo() #end On Sat, May 19, 2012 at 7:14 AM, Nathan Bubna nbu...@gmail.com wrote: That looks great! On Sat, May 19, 2012 at 12:11 AM, Steve O'Hara soh...@pivotal-solutions.co.uk wrote: Just a note

Re: More 1.7 BC issues (porting from 1.5)

2012-05-03 Thread Nathan Bubna
Anything in the log? #set($type = \\) is not valid syntax, i think. I'm not even sure what value you want $type to have. Two double quotes or an empty string? On Thu, May 3, 2012 at 11:17 AM, Boris Partensky boris.parten...@gmail.com wrote: Hi, I have this use case which involves 2 nested

Re: More 1.7 BC issues (porting from 1.5)

2012-05-03 Thread Nathan Bubna
Ah, it was Sergiu, not Byron. Here's the relevant discussion: https://issues.apache.org/jira/browse/VELOCITY-681 On Thu, May 3, 2012 at 12:16 PM, Nathan Bubna nbu...@gmail.com wrote: Ok, for my sanity, is this an accurate rewrite? #macro( inner $arg )  #set($ref = '')$arg #end #macro

Re: More 1.7 BC issues (porting from 1.5)

2012-05-03 Thread Nathan Bubna
()    {        String template = #macro( inner $arg )#set($ref = '')$arg#end#foreach( $ref in ['foo','bar','yok','dar'] )#inner( $ref )#end;        String eval = evaluate(template);        assertEquals(eval, , eval);    } On Thu, May 3, 2012 at 3:16 PM, Nathan Bubna nbu...@gmail.com wrote: Ok

Re: upgrading from 1.5 to 1.7 compatibility issues

2012-05-01 Thread Nathan Bubna
if you are nesting calls to #@mymacroname :) Thanks Boris On Mon, Apr 30, 2012 at 5:08 PM, Nathan Bubna nbu...@gmail.com wrote: On Mon, Apr 30, 2012 at 1:06 PM, Boris Partensky boris.parten...@gmail.com wrote: I am seeing 3 bullet points there pertinent to this issue and all 3 seem

Re: upgrading from 1.5 to 1.7 compatibility issues

2012-04-30 Thread Nathan Bubna
Yeah, it was intended, and part of an overall move toward fixing/simplifying Velocity's variable scoping, avoiding the complexities and costs (performance, yes, but mostly time/brainpower for users and devs alike) of more programming language type behavior. Velocity has long aspired to be a

Re: upgrading from 1.5 to 1.7 compatibility issues

2012-04-30 Thread Nathan Bubna
it almost impossible to upgrade (at least for us). Thanks Boris On Mon, Apr 30, 2012 at 12:55 PM, Nathan Bubna nbu...@gmail.com wrote: Yeah, it was intended, and part of an overall move toward fixing/simplifying Velocity's variable scoping, avoiding the complexities and costs (performance

Re: is it possible to maintain a foreach directive after a VelocityEngine.evaluate()?

2012-04-30 Thread Nathan Bubna
No, i don't think there's a way to do that automatically without customizing your velocity build. But you can fake it: #set( $h = '#') #set( $d = '$' ) #foreach( $element in $object1.elements ) #end #if( !$object1 ) ${h}foreach( ${d}element in $object1.elements ) ${h}end #end On Mon, Apr 30,

Re: upgrading from 1.5 to 1.7 compatibility issues

2012-04-30 Thread Nathan Bubna
notification are you referring to? Wonder if there is something else in there I am not aware of. On Mon, Apr 30, 2012 at 2:34 PM, Nathan Bubna nbu...@gmail.com wrote: Congratulations, Boris.  You are the corner case we feared.  :-/  We knew when we went ahead with this that providing a migration path

Re: upgrading from 1.5 to 1.7 compatibility issues

2012-04-30 Thread Nathan Bubna
This might be of use too: http://velocity.apache.org/engine/releases/velocity-1.7/upgrading.html On Mon, Apr 30, 2012 at 12:51 PM, Nathan Bubna nbu...@gmail.com wrote: http://velocity.apache.org/engine/devel/changes-report.html#a1.7 On Mon, Apr 30, 2012 at 12:37 PM, Boris Partensky

Re: upgrading from 1.5 to 1.7 compatibility issues

2012-04-30 Thread Nathan Bubna
. On Mon, Apr 30, 2012 at 3:51 PM, Nathan Bubna nbu...@gmail.com wrote: http://velocity.apache.org/engine/devel/changes-report.html#a1.7 On Mon, Apr 30, 2012 at 12:37 PM, Boris Partensky boris.parten...@gmail.com wrote: No problem, thanks for making things clear. we decided to forego it and notify

Re: Configuring number of parsers and buffer sizes

2012-04-26 Thread Nathan Bubna
parser.pool.size is this in 1.7? i thought we trimmed a lot of the excess between 1.5 and 1.6, but if we can trim more, that'd be swell. On Thu, Apr 26, 2012 at 5:59 PM, Christopher Schultz ch...@christopherschultz.net wrote: All, I've been looking at the docs for both Velocity Tools and

Re: getting session id

2012-04-18 Thread Nathan Bubna
If you put the HttpSession into the Velocity context, then you can use it. The VelocityViewServlet (part of the VelocityTools project) does that for you automatically. Thus the references to $session being magically available. On Wed, Apr 18, 2012 at 11:46 AM, Michael Remijan mremi...@bjc.org

Re: getting session id

2012-04-18 Thread Nathan Bubna
The VelocityViewServlet does. Velocity itself is merely a template engine and knows nothing about J2EE, nor should it. On Wed, Apr 18, 2012 at 12:04 PM, Michael Remijan mremi...@bjc.org wrote: It doesn't put the session in automatically??  the same with the request? Nathan Bubna nbu

Re: ReferenceInsertionEventHandler

2012-03-30 Thread Nathan Bubna
It would not be called on $testing, because $testing is not being inserted into the output. And it is not called on the variables within the loop, because in this example testing appears to be null/empty, so there is no attempt to render the body of the #foreach. On Fri, Mar 30, 2012 at 6:45 AM,

Re: Velocity engine 2.0 release

2012-03-26 Thread Nathan Bubna
It'll be released when it's ready, and how quickly that happens depends on people stepping up to help. Feel free to jump in and help. There are open issues in JIRA, as well as general testing and performance testing that needs to happen. So much energy in the webapp world has slipped over to

Re: Velocity syntax

2012-03-26 Thread Nathan Bubna
On Mon, Mar 26, 2012 at 12:36 AM, Nikhil G. Daddikar n...@celoxis.com wrote: Hello, I was looking at Velocity syntax and have a few questions. What is use of parenthesis in the #set directive: #set ($x = 1) Why not simply: #set $x = 1 ? Why do you ask? Is there some reason that a space is

Re: [ANNOUNCE] Velosurf 2.3

2012-03-09 Thread Nathan Bubna
Congrats, Claude! Great work. On Fri, Mar 9, 2012 at 8:45 AM, Claude Brisson cla...@renegat.net wrote: Velosurf 2.3 has just been released. This release brings several new features, among which 'upsert' methods, per-field dirty flags, a cleaner syntax to specify external parameters for a

Re: Dynamic Templates

2012-02-09 Thread Nathan Bubna
Would you consider submitting this via https://issues.apache.org/jira/browse/VELOCITY? That would allow us to possibly incorporate improvements from your code into future versions. On Thu, Feb 9, 2012 at 2:47 PM, Mark-12345 marks1900-pos...@yahoo.com.au wrote: I thought I would share the

Re: Validate templates before use

2012-02-06 Thread Nathan Bubna
Pre-validating templates would fall in the advanced uses category, making it much more reasonable to interact with Template. :) On Mon, Feb 6, 2012 at 7:07 AM, Chad La Joie laj...@itumi.biz wrote: Thanks, thats what I was looking for.  After my last email about the Template object I wasn't sure

Re: Most efficient evaluation

2012-02-04 Thread Nathan Bubna
On Sat, Feb 4, 2012 at 7:58 AM, Chad La Joie laj...@itumi.biz wrote: I'm looking for the most efficient/performant way to evaluate a template and have some questions surrounding this. 1. Are Template objects reusable and thread safe?  If they're just ASTs, it seems like they should be. Yes,

Re: MIME type for velocity templates

2012-01-31 Thread Nathan Bubna
On Tue, Jan 31, 2012 at 7:48 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 1/25/12 1:16 PM, Nathan Bubna wrote: text/velocity sounds fine to me.  this isn't something that i recall coming up previously, so i'm pretty sure there's no official opinion. Why not text

Re: Stopping parsing

2012-01-29 Thread Nathan Bubna
This is probably something best handled by a Filter, not in a template. But that said, no, there is no stop parsing command anymore. As of Velocity 1.7, #stop is used to stop *rendering* instead of parsing. But i think that's what you want, right? On Sun, Jan 29, 2012 at 12:49 PM, Andrew

Re: Velocity and XML as context

2012-01-25 Thread Nathan Bubna
You might prefer the syntax provided by the XmlTool (in the VelocityTools project) http://velocity.apache.org/tools/releases/2.0/javadoc/org/apache/velocity/tools/generic/XmlTool.html I much prefer it to Anakia and DVSL for simply navigating/reading xml files in a template. On Wed, Jan 25, 2012

Re: Velocity template Evaluation

2012-01-24 Thread Nathan Bubna
What is dead may never die, but rises again, harder and stronger. Ok, but seriously, dead means no community. When a project's community dies, Apache puts it into the Attic project. So pretty much any non-Attic project is not dead. Velocity has both a large user community that supports each

Re: Thread safety reuse ToolContext in Servlet Environment

2012-01-19 Thread Nathan Bubna
Yes, that looks safe to me. As long as the ToolContext is nested behind another context, so it isn't changed by #set calls in the threads, you should be fine. On Wed, Jan 18, 2012 at 2:16 AM, Christian Beutenmüller christian.beutenmuel...@saxess.ag wrote: Hi folks, I'm currently embedding

Re: Can clients really specify 'layout' parameter in the URL?

2012-01-09 Thread Nathan Bubna
On Mon, Jan 9, 2012 at 11:00 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 1/8/12 2:04 PM, Nathan Bubna wrote: The tools.view.servlet.layout.directory property is fairly important here, as it is prefixed to layout paths.  i didn't think just slipping .. into the path

Re: $hollow.message cannot be resolved

2011-12-22 Thread Nathan Bubna
You put your Hollow class under the key $toytool (in the toolbox). Why then does your template look for $Hollow.message instead of $toytool.message? On Thu, Dec 22, 2011 at 11:33 AM, SigmaSquared freddiej...@hotmail.com wrote: Velocity isnt picking up the class and the var in that class (i.e.

Re: Problem with userdirective in velocity-1.7

2011-12-13 Thread Nathan Bubna
I'm working on a servlets-based project that uses Velocity and I'm trying to upgrade from version 1.6.2 to 1.7.  Unfortunately, I can't figure out how to make the userdirective property work the way it did in 1.6.2. weird. i don't remember anything changing with that property. will you

Re: Avoiding whitespace

2011-11-02 Thread Nathan Bubna
, 2011 at 12:11 PM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 10/31/11 11:45 AM, Nathan Bubna wrote: In that case, the documentation is wrong.  Leading whitespace is only trimmed from in front of a #set directive that has nothing after it. I'm not aware of any other case

Re: Avoiding whitespace

2011-10-31 Thread Nathan Bubna
In that case, the documentation is wrong. Leading whitespace is only trimmed from in front of a #set directive that has nothing after it. I'm not aware of any other case where leading whitespace is trimmed. On Mon, Oct 31, 2011 at 7:29 AM, Christopher Schultz ch...@christopherschultz.net wrote:

Re: Velocity to fetch full docs?

2011-09-26 Thread Nathan Bubna
Definitely for a question for the Nutch or Solr lists. Velocity is a simple template engine and knows nothing about Nutch or Solr that it isn't told about. On Mon, Sep 26, 2011 at 5:17 AM, Fred Zimmerman w...@nimblebooks.com wrote: Hi, I am using Nutch/Solr to index an intranet of about 12

Re: Getting Velocity working with Google App Engine

2011-09-25 Thread Nathan Bubna
tools.xml is supported by the VelocityTools project. make sure you include a current VelocityTools jar. On Sun, Sep 25, 2011 at 12:51 PM, Andrew Ducker and...@ducker.org.uk wrote: I'm plugging away at this, because I'd like to use Velocity for the templates in the app I'm working on. I've

Re: Getting Velocity working with Google App Engine

2011-09-25 Thread Nathan Bubna
On Sun, Sep 25, 2011 at 3:08 PM, Andrew Ducker and...@ducker.org.uk wrote: On 25/09/2011 21:33, Nathan Bubna wrote: tools.xml is supported by the VelocityTools project.  make sure you include a current VelocityTools jar. I've got Velocity-tools-view-2.0.jar included.  I've also used

Re: Passing an object as a parameter to a method

2011-09-20 Thread Nathan Bubna
and it should be ${report.generate($null)} too, for that matter. :) On Tue, Sep 20, 2011 at 4:08 PM, Nathan Bubna nbu...@gmail.com wrote: ${report.generate($project.manager)} On Tue, Sep 20, 2011 at 4:07 PM, Alec Swan alecs...@gmail.com wrote: Hello, I am trying to get the following

Re: Problems with #set($var = $x - $a.func($z))${var}

2011-08-24 Thread Nathan Bubna
what are the types of $x and $a.func($z) ? subtraction only works on java.lang.Number (or primitive counterparts) or objects that implement Velocity's TemplateNumber interface. On Wed, Aug 24, 2011 at 12:33 PM, Alec Swan alecs...@gmail.com wrote: Hello, I am having problems with getting the

Re: Problems with #set($var = $x - $a.func($z))${var}

2011-08-24 Thread Nathan Bubna
, Aug 24, 2011 at 12:51 PM, Alec Swan alecs...@gmail.com wrote: Ah, looks like $x type is a string even though it represents a number.  Is there any type casting in Velocity? On Wed, Aug 24, 2011 at 1:46 PM, Nathan Bubna nbu...@gmail.com wrote: what are the types of $x and $a.func($z

Re: Evaluating basic expression

2011-08-16 Thread Nathan Bubna
Velocity is not a scripting language; it's a template engine. It doesn't have standalone expressions like that. It has references and directives, some directives handle expressions in the arguments. Some references handle expressions as arguments to method calls. That said, even if you put

Re: [tools] StrutsLinkTool's setForward method has different behavior

2011-07-28 Thread Nathan Bubna
Wow. Slow down. I already fixed VELTOOLS-146. You need to svn update your code. On Thu, Jul 28, 2011 at 10:00 AM, Christopher Schultz ch...@christopherschultz.net wrote: All, On 7/28/2011 12:48 PM, Christopher Schultz wrote: I think the solution is to modify this so that

Re: [tools] StrutsLinkTool's setForward method has different behavior

2011-07-28 Thread Nathan Bubna
Also, these discussions REALLY need to happen on dev@. user@ is not the right place. On Thu, Jul 28, 2011 at 10:20 AM, Nathan Bubna nbu...@gmail.com wrote: Wow.  Slow down.  I already fixed VELTOOLS-146.  You need to svn update your code. On Thu, Jul 28, 2011 at 10:00 AM, Christopher Schultz

Re: [tools] StrutsLinkTool's setForward method has different behavior

2011-07-27 Thread Nathan Bubna
On Wed, Jul 27, 2011 at 7:32 AM, ch...@christopherschultz.net wrote: ... Basically, setForward passes the url to absolute(url) which would correctly handle absolute urls with query strings but treats relative urls as merely paths, without parsing out anchors or query strings. Okay, I'll

Re: LinkTool.addRequestParams is difficult to use due to varargs/String[] parameter

2011-07-27 Thread Nathan Bubna
On Wed, Jul 27, 2011 at 11:59 AM, Christopher Schultz ch...@christopherschultz.net wrote: All, I've been trying to switch my templates from using LinkTool.addIgnore()addAllParameters() to use LinkTool.addRequestParamsExcept(String... allButThese) but I'm having a bit of difficulty with

Re: [tools] LinkTool.addAllParameters is not behaving as before

2011-07-26 Thread Nathan Bubna
On Tue, Jul 26, 2011 at 2:59 PM, Christopher Schultz ch...@christopherschultz.net wrote: All, On 7/26/2011 5:23 PM, Christopher Schultz wrote: As I get further into the testing of Velocity Tools 2.0, I'm finding that the addAllParameters method isn't working as it used to. Given:

Re: Velocity Tools 2.0 README has incorrect build instructions

2011-07-21 Thread Nathan Bubna
On Thu, Jul 21, 2011 at 9:44 AM, Christopher Schultz ch...@christopherschultz.net wrote: ... All important changes not linked to the build system change have been backported to the branch. Feel free to commit in it, we'll forward-post changes if needed. Great. I have created an enhancement

Re: Velocity Tools 2.0 README has incorrect build instructions

2011-07-21 Thread Nathan Bubna
On Thu, Jul 21, 2011 at 10:06 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 7/21/2011 12:54 PM, Nathan Bubna wrote: On Thu, Jul 21, 2011 at 9:44 AM, Christopher Schultz ch...@christopherschultz.net wrote: ... All important changes not linked to the build system

Re: Trouble finding velocity.properties in a jar

2011-07-21 Thread Nathan Bubna
I would do two things (the first of which, you have probably done). 1) double-check that the build process for the JAR is correctly putting the velocity.properties file into the root of the jar and that the jar is in the classpath 2) try finding it elsewhere in the classloader heirarchy:

Re: Velocity Tools 2.0 README has incorrect build instructions

2011-07-21 Thread Nathan Bubna
On Thu, Jul 21, 2011 at 10:25 AM, Christopher Schultz ch...@christopherschultz.net wrote: Nathan, On 7/21/2011 1:06 PM, Christopher Schultz wrote: I'll go ahead and commit everywhere. Hmm... I'm having trouble building trunk. That could be due to a number of environmental factors including

Re: Trouble finding velocity.properties in a jar

2011-07-21 Thread Nathan Bubna
On Thu, Jul 21, 2011 at 10:31 AM, Christopher Schultz ch...@christopherschultz.net wrote: Dave, On 7/21/2011 12:37 PM, laredotornado wrote:               final InputStream resourceStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(velocity.properties); Should that

  1   2   3   4   5   6   >