Search code examples
javajodd

Can Jodd provide functionality like apache tiles framework?


I am using jodd in my project. I am using lots of functionality jodd like madvoc , petite. I am looking functionality like apache tiles framework I have seen and read the post http://jodd.org/doc/decora/ but I don't get to much. Can any one provide working example of decora.


Solution

  • Ok, this is not short question - so please be a bit more concrete here on StackOverflow :)

    Decora is quite simple and somewhat different then Apache Tiles. It reminds on old, good SiteMesh. Now, let me explain how it works:

    • with your business logic, create an design-free html page. Generate the content right in the <body>.

    • Now, create a template with design, colors, images... Choose where you want your content to be injected; like inside certain div.

    • After you apply Decora, the body content from the page will be decorated with the template, by inserting it into this div.

    This is how it works in a nutshell. You have working example in Uphea but just note that is a bit older version of Jodd used. Also, there is quickstart project, that has Decora configured.

    Decora is more powerful then above - you may have more regions on one page, set the header tags like title and so on. You may use html tags for marking the regions, or JSP tags, etc.