Reputation: 4503
I pass to Apache Velocity template a variable of type User
(created by me). User
has method getUsername()
and in Velocity template I use this as follows:
#if($user)
<p>
User Created $user.getUsername()
</p>
#end
but output is User Created $user.getUsername()
and not User Created Pluto
as expected; Why?? Can You help me??
Upvotes: 1
Views: 1172
Reputation: 6933
That means that the value returned by the getUsername() method is null, or perhaps that that method doesn't exist.
Upvotes: 2