struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adam brin <ab...@digitalantiquity.org>
Subject struts 2.3.16 custom (sub-classed) theme issue
Date Wed, 22 Jan 2014 20:34:37 GMT
This is related to WW-4145, I think.

When upgrading to 2.3.16, we're receiving the following error messages for
our locally created theme.  This theme builds off of the simple theme, but
mostly includes "custom" controlheader and controlfooter elements. The
issue we're seeing is that struts seems to be looking for "inherited" files
(e.g. css.ftl from the simple theme) in our custom theme instead of the
parent theme (in our case simple).

This only happens when we use two input themes on the same page:

<!-- start page -->

<@s.textarea name="test2" theme="tdar"  label="test2"/>
<@s.textarea name="test" theme="xhtml" label="test" />

<!-- end page -->



Our theme lives in src/main/webapps/template.  We're not overriding the
templateDir directive anywhere.  Our theme "tdar"  contains the following
files:

   - checkbox.ftl
   - checkboxlist.ftl
   - controlfooter.ftl
   - controlheader.ftl
   - controllabel.ftl
   - file.ftl
   - hidden.ftl
   - password.ftl
   - radiomap.ftl
   - select.ftl
   - text.ftl
   - textarea.ftl
   - theme.properties


When loading a page that uses only the textarea:

<@s.textarea name="test" theme="tdar" />


we receive the following error:

Caused by: freemarker.core._MiscTemplateException: Error reading included
file "template/~~~tdar/css.ftl":
Template "template/~~~tdar/css.ftl" not found.

The failing instruction (print stack trace for 1 more):
==> #include "/\${parameters.templateDir}...  [in template
"template/simple/textarea.ftl" at line 42, column 1]


the textarea.ftl contains:

<#include
"/${parameters.templateDir}/${parameters.theme}/controlheader.ftl"
/><#include "/${parameters.templateDir}/simple/textarea.ftl" />
<#include
"/${parameters.templateDir}/${parameters.theme}/controlfooter.ftl" />


note, I've tried change parameters.theme to parameters.expandTheme as
documented here:
http://struts.apache.org/release/2.3.x/docs/extending-themes.html

our theme.properties contains:

parent=simple


is anyone else seeing this? Or, are we missing something with our
configuration?

thanks,

adam
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message