Calling methods with different signatures
Greg Huber <[email protected]> Thu, 15 Aug 2013 09:15:42 +0100
| Newsgroups | gmane.comp.jakarta.velocity.user |
|---|---|
| Message-ID | <CAJi=3dW=df68Qxd5T2M_iswEz=n7T637hKiCa0MTCRPrczkudQ@mail.gmail.com> |
Hello,
Just checking on this.
I have two methods on a pojo that I want to call from a template:
public String getTransformedBody() {
...
}
public String getTransformedBody(int lower, int upper, String appendToEnd)
{
...
}
It seems that I have to use a #set to call the one without parameters?
#set($notes=$entry.getTransformedCommentBody())
$notes
Whilst:
$entry.getTransformedCommentBody(230, 235, "...")
seems to render correctly.
Is this correct?
Cheers Greg.