velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venkatesh Prasad Ranganath <comfortably007numb-pyt...@yahoo.com>
Subject Velocity Tool issues
Date Tue, 08 Jun 2004 01:30:29 GMT
I use the following template

#set ($t = $arrayTool.size($return1_array))
$arrayTool.size($return1_array)
$t

with the following tool and it's configuration


  <tool>
    <key>arrayTool</key>
    <scope>application</scope>
    <class>ArrayTool</class>
  </tool>


public class ArrayTool {
         public int size(int[] array) {
                 return array.length;
         }

     /*
         public int size(Object[] array) {
                 return array.length;
         }
         public Object get(Object[] array, int index) {
                 return array[index];
         }
     */

         public int get(int[] array, int index) {
                 return array[index];
         }

}

However, the output is

$arrayTool.size($return1_array)
$t

What's happening?  I am passing a int[] as return1_array.

-- 

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad


---------------------------------------------------------------------
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