technologist, entrepreneur, vision­ary, programmer

Adding a new Theme to a Spring Roo Project


Yes it would be good idea for a simple addon, but until someone (or myself) get around to writing one, here is the solution for the impatient:

  1. go to /src/main/webapp/WEB-INF/classes and duplicate the standard.properties as your new theme – for example: new.properties
  2. Edit the /src/main/webapp/WEB-INF/i18n/messages.properties and the name of your Theme:
    global_theme_new=My New Theme
  3. Next edit /src/main/webapp/WEB-INF/tags/util/theme.tagx and add your new theme (before the last

    .  For Example:

      <c:out value=" | " />
      <spring:url var="url_theme3" value="">
        <spring:param name="theme" value="new" />
        <c:if test="${not empty param.page}">
          <spring:param name="page" value="${param.page}" />
        <c:if test="${not empty param.size}">
          <spring:param name="size" value="${param.size}" />
      <spring:message code="global_theme_new" var="theme_new" />
      <a href="${url_theme3}" title="${theme_new}">${theme_new}</a>
If you have read this far, you may as well follow me on Twitter:

Author: poornerd

Tech­nol­o­gist, Entre­pre­neur, Vision­ary, Pro­gram­mer :: Grad­u­ated from USC (Uni­ver­sity of South­ern Cal­i­for­nia) with a degree in Com­puter Sci­ence. After 10+ years of free­lance con­sult­ing and pro­gram­ming, he co-founded Site­Force AG eBusi­ness Solu­tions in 1999 in Munich (München), Ger­many.

Leave a Reply

Required fields are marked *.