Hi All-

I'm using velocity 1.3 and am generating some text from a template that has
the following code:

#if ( $model.getCount() == 1 ) ... #end

The model object has method getCount() which returns Long (the primitive
wrapper object).  It seems this comparison is not happening correctly as the
"..." text is not included in the output.  I've also tried the following:

#if ( $model.getCount() == "1" ) ... #end

and

#if ( $model.getCount() == '1' ) ... #end

thinking that it might be calling toString on the Long object itself, but
this does not work either.  I've confirmed $model.getCount() on a line by
itself outputs the single '1' character in the generated text.

What would I need to do to get this conditional working?

Thanks,
David

Reply via email to