struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adam pinder <apin...@hotmail.co.uk>
Subject RE: Overriding Templates
Date Tue, 19 Oct 2010 10:02:32 GMT

 
The theme is set to simple as was for struts 2.0.11
My struts.xml is very plain and i don't see it would help with this particular issue.
 
My jsp contains the following 
 
<div style="text-align: center; margin-bottom: 10px; padding-top: 5px">
<s:actionmessage theme="simple"/>
<s:actionerror theme="simple"/>
</div> 
 
The revised templates were overriding the jar templates in 2.0.11 just not in 2.2.1 - no code
changes have been made so it must be something in how latest struts2 is working.
 
Looking at the templates for action message/errors in latest jar - they have additonal text
regarding parameters etc.. i wondered if maybe the amended templates are now invalid in some

way and so it reverts back to templates in jar file - no errors are logged though.
 
My action error template contains the following 
 
<#if (actionErrors?exists && actionErrors?size > 0)>
<div style="PADDING-BOTTOM: 10px; PADDING-TOP: 10px; WIDTH: 100%; text-align: center">
<#list actionErrors as error>
<p class="ui-state-highlight">${error}</p>
</#list>
</div>
</#if>
 
Adam

 
> Date: Tue, 19 Oct 2010 11:39:13 +0900
> Subject: Re: Overriding Templates
> From: liying.cn.2010@gmail.com
> To: user@struts.apache.org
> 
> Hi adam:
> 
> what theme are you using?
> 
> The default theme in Struts2.2.1 is [xhtml].
> 
> Maybe you need change the default theme or the theme of your tag to [simple].
> 
> Can you show us your setting file(struts.xml and so on) and your jsp code?
> 
> 
> 2010/10/19 adam pinder <apinder@hotmail.co.uk>:
> >
> >
> >
> > I have just upgraded struts2 version from 2.0.11 to 2.2.1 and one issue seems to
be that i have amended templates
> >
> > actionerror.ftl
> > actionmessage.ftl
> >
> > and they were placed into WebContent\template\simple folder in the web app and with
2.0.11 they overrided the templates in the struts2 core jar file correctly...
> >
> > with 2.2.1 it's now always using the templates in the struts2 core jar even though
i can see inside this jar the folder structure and filenames have not changed..
> >
> > with 2.2.1 do you need to place the overriding templates in a different folder for
it to work ?
> >
> > note. i have upgraded other jars as it seemed appropriate for this struts version.
> >
> > thanks
> > adam
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message