You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nick Scavelli <ni...@hotmail.com> on 2008/06/20 16:56:13 UTC
Extending Theme Issue (Struts 2.1.2)
I am struggling to extend a theme for my web application. The parent property in theme.properties does not seem to work for my custom theme I am trying to implement. Theme name is ccast2_0, and I have added struts.ui.theme=ccast2_0 and struts.ui.templateDir=template to struts.properties. Side note you cannot have a period in the theme name. Adding struts.ui.theme=ccast2.0 threw a NullPointerException. Changed to 2_0 and it worked, sorta...Continuing on:
According to the documentation I should be able to have /template/ccast2_0 with a theme.properties file and parent=xhtml in the file and be set. Not the case since I'm getting this error:
06/20/2008 10:44:26,859 ERROR (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:24) - Could not load the FreeMarker template named 'form-close':
06/20/2008 10:44:26,859 ERROR (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:24) - Attempted: /template/ccast2_0/form-close.ftl
06/20/2008 10:44:26,859 ERROR (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:24) - The TemplateLoader provided by the FreeMarker Configuration was a: freemarker.cache.MultiTemplateLoader
06/20/2008 10:44:26,859 ERROR (com.opensymphony.xwork2.util.logging.commons.CommonsLogger:28) - error when rendering
java.io.FileNotFoundException: Template /template/ccast2_0/form-close.ftl not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:489)
at freemarker.template.Configuration.getTemplate(Configuration.java:452)
If I copy all the xhtml theme files from the struts2 jar into this folder, guess what it works. This is not extending, that's copying. I also copied all theme files from the struts2 jar: simple, xhtml, css_xhtml, into my /template/<theme> directory to see if that worked and no dice. I must be doing something extremely stupid here because I haven't seen any posts regarding this issue.
Please advise !
Cheers,
Nick
_________________________________________________________________
Need to know now? Get instant answers with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_062008