Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > UI Tags > Themes and Templates > simple theme
Added by plightbo, last edited by Ted Husted on Sep 02, 2006  (view change)

The simple theme renders "bare bones" HTML elements. The simple theme is most often used as a starting point for other themes. (See test:Extending Themes for more.)

For example, the test:textfield tag renders the HTML <input/> tag without a label, validation, error reporting, or any other formatting or functionality.

Both the test:xhtml theme and test:css_xhtml theme extend the simple theme. Look to them for examples of how to build on the foundation laid by the simple theme.

Head Tag

The simple theme test:head template prints out an HTML <link/> to the CSS required for the test:datepicker tag to render properly.

The source of the simple head.ftl template is:

Content pulled from external source. Click here to refresh.
<script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
        baseRelativePath: "<@s.url includeParams='none' value='/struts/dojo' includeParams="none" encode='false'/>",
        isDebug: ${parameters.debug?default(false)},
        bindEncoding: "${parameters.encoding}",
        debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
    };
</script>
<script language="JavaScript" type="text/javascript"
        src="<@s.url includeParams='none' value='/struts/dojo/dojo.js' includeParams="none" encode='false'/>"></script>
<script language="JavaScript" type="text/javascript"
        src="<@s.url includeParams='none' value='/struts/simple/dojoRequire.js' includeParams="none" encode='false'/>"></script>