Disclaimer: Haven’t worked with WebActions yet, so I might be wrong about this.
From my understanding, Velocity is only a rendering engine. So once the page is rendered, I don’t think you can call a Java function. Any Java function calls happen during rendering, i.e. before the user can interact with the site.
Hope that helps.