You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amit Khanna <am...@gmail.com> on 2011/10/14 10:05:58 UTC

Struts2 extending theme

Following the struts2 extending theme
tutorial[http://struts.apache.org/2.0.14/docs/extending-themes.html] I
created a new theme "better" that extends the "simple" theme available
with struts. I created theme.properties file in folder theme/better/
and also copied and modified radiomap.ftl

theme.properties:
--------------------------
parent=simple
-------------------------

jsp snippet
----------------------------------------------------------------------------------------
<s:form theme="better">
<s:radio list="{'RED','BLUE'}" theme="better"></s:radio>
</s:form>
----------------------------------------------------------------------------------------

this code gives and error

----------------------------------------------------------------------------------------
java.io.FileNotFoundException: Template /template/better/form.ftl not found.
----------------------------------------------------------------------------------------
but when I remove theme="better" from form tag it works fine

working jsp snippet
----------------------------------------------------------------------------------------
<s:form theme="better">
<s:radio list="{'RED','BLUE'}" theme="better"></s:radio>
</s:form>
----------------------------------------------------------------------------------------
does this mean that I have to copy all the .ftl files in the
themes/better directory? in struts code jar file i found that xhtml
theme extends simple theme but it doesn't copy all files from simple
theme.

What is a better way of extending the theme?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 extending theme

Posted by Maurizio Cucchiara <mc...@apache.org>.
Where have you put your theme folder?

Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara



On 14 October 2011 10:05, Amit Khanna <am...@gmail.com> wrote:
> template/better/form.ftl not found.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org