velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Davison <dar...@davison.uk.net>
Subject Re: exception using ViewRenderTool
Date Wed, 09 Jun 2004 05:45:54 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 09 June 2004 02:29, Nathan Bubna wrote:

> hmm.  looks like the recurse method will throw an NPE if the call to
> Velocity.evalute() fails.  i'm committing a change so that will be
> handled better, but even if i do, your recurse evalution will still be
> broken. without knowing what you're trying to recurse on, i can't help
> with that.

I get the trace trying to do anything - including the simple examples in the 
JavaDocs for ViewRenderTool..

Example of eval():
      Input
      -----
      #set( $list = [1,2,3] )
      #set( $object = '$list' )
      #set( $method = 'size()' )
      $render.eval("${object}.$method")

      Output
      ------
      3
 
 Example of recurse():
      Input
      -----
      #macro( say_hi )hello world!#end
      #set( $foo = '#say_hi()' )
      #set( $bar = '$foo' )
      $render.recurse('$bar')

      Output
      ------
      hello world!

- -- 
Darren Davison
Public Key: http://www.davison.uk.net/pages/key.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAxqQTKLMLAN01aw0RApMxAJ9VcUprE1VN28UxhGduT1JJitlfRQCgnbEr
MwDhgaCqjUie27ZifdhKriQ=
=OL6S
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message