Render the given function on a separate thread and send the resulting JavaScript to the current page when the function completes.
Render the given function on a separate thread and send the resulting JavaScript to the current page when the function completes. Wraps the function so that it is executed in the current request and session context.
Returns a Failure
if something went wrong with setting up the
asynchronous render.
Similar to asyncRender
, but any wrapping of the function in a request
context is expected to be done before renderFunction
is passed to this,
while asyncRender
takes care of the wrapping for you.
If you're going to be managing the asynchronicity of the render externally (e.g., with futures), call this when you're ready to render your results and the rendering will be sent down to the client.
If you're going to be managing the asynchronicity of the render externally (e.g., with futures), call this when you're ready to render your results and the rendering will be sent down to the client.
When possible, prefer the use of the lazy
snippet, the asyncRender
function, or the CanBind
implicits for Future
and LAFuture
.
Returns a Failure
if something went wrong with looking up the
asynchronous renderer.
If you're going to be managing the asynchronicity of the render externally, make sure to call this so that the async plumbing will be set up on the page when it gets sent down.
If you're going to be managing the asynchronicity of the render externally, make sure to call this so that the async plumbing will be set up on the page when it gets sent down.
When possible, prefer the use of the lazy
snippet, the asyncRender
function, or the CanBind
implicits for Future
and LAFuture
.
Returns a Failure
if something went wrong with setting up the
asynchronous render.