Is there a way to display object variables inside the velocity template?
It only seems to work with "toString()". I saw something about wrapping the object, but how would this be possible in jira?
example:
java class:
class a
{
public String name;
public String getName(){return "test";}
public String fullUsername = "test";
@Override
public String toString() {return "test";}
}
context.put("object", new a());
velocity template:
<html>
<head>
<title>test</title>
<meta name="decorator" content="atl.general">
</head>
<body>
<form id="" class="aui" action="" method="post">
<td>$object.getName()</td> <!-- does not work -->
<td>$object.toString()</td> <!-- works!!! -->
<td> $object.name </td> <!-- does not work -->
</form>
</body>
</html>
Thank you for your time!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.