On 13-11-28 3:15 AM, Phillip Johnsen wrote:
What do you use to generate URL/links server side in Java? In JSP/etc spring
provides handy
taglibs (ie:
<spring:url />), to automatically calculate
contextPaths, etc. But I haven't found anything as quick and easy to use in
Java.
Have you tried UriComponentsBuilder from Spring? Added a small example of using
it in the HomeController of tiles-mustache-example yesterday, seems to be
working pretty well.
I took a look at your example, and it seems to be working. Not as practical as <spring:url> in a JSP page, but for rendering on the client side,
makes sense that I can't use it. I'll have to play around with mustache functions to see if I could make it work more easily.
I looked through your Tiles example in more detail, and definitely learnt a few things (esp with the TilesContoller). Thanks! One thing that I am
still unclear how to do is how to use partials. How does Tiles prepare partials? Where is the partials template retrieved from? mustache.js and
bartefrans.js seem to have clear instructions how to use them on the client side, but I'm still unclear how they need to be configured for use on the
server side. Are they simply configured as a cascaded attributes in the existing template definition?
Thanks,
Eric