Until now when sending ajax requests, in our controller we did return JsonMessage and decorate the data in the client side. But recently we are using a third-party UI framework which accepts a ready to use HTML as ajax callback.
Is there a way to do this without bringing all the html markup to the controller? something like a post-processor which accepts JSON and a template, renders it and then sends it to the client?
Note: The response is in JSON format, which has an attribute containing that HTML.
We use springframework 4.2.6.