Adding a new Theme to a Spring Roo Project

Posted by Brian Porter on February 11, 2011

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 as your new theme – for example:
  2. Edit the /src/main/webapp/WEB-INF/i18n/ and the name of your Theme: <pre class="brush: plain; title: ; notranslate" title="">global_theme_new=My New Theme</pre>

  3. Next edit /src/main/webapp/WEB-INF/tags/util/theme.tagx and add your new theme (before the last <pre class="brush: plain; title: ; notranslate" title=""></span></pre>
.  For Example:</li> </ol> 

<pre class="brush: plain; title: ; notranslate" title="">&lt;c:out value=" | " /&gt;
  &lt;spring:url var="url_theme3" value=""&gt;
    &lt;spring:param name="theme" value="new" /&gt;
    &lt;c:if test="${not empty}"&gt;
      &lt;spring:param name="page" value="${}" /&gt;
    &lt;c:if test="${not empty param.size}"&gt;
      &lt;spring:param name="size" value="${param.size}" /&gt;
  &lt;spring:message code="global_theme_new" var="theme_new" /&gt;
  &lt;a href="${url_theme3}" title="${theme_new}"&gt;${theme_new}&lt;/a&gt;


If you made it this far, you may as well follow me on LinkedIn: Follow Brian Porter