You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ignacio de Córdoba <ic...@skios.es> on 2009/02/24 11:14:19 UTC

FreeMarker error when trying to use AJAX Theme

Hi there,
i am trying to use AJAX theme to use sx:datetimepicker tag but whether or
not I use that tag I am getting the following error only by adding the ajax
header:

<sx:head debug="true" cache="false" compressed="false" />

I thought it was caused by the date picker, but it happens on every page (I
use Tiles2 with struts2.1)

Thanks for any help/directions:

FreeMarker template error!



Expression parameters.pushId is undefined on line 24, column 6 in
template/ajax/a-close.ftl.
The problematic instruction:
----------
==&gt; if parameters.pushId [on line 24, column 1 in
template/ajax/a-close.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression parameters.pushId is
undefined on line 24, column 6 in template/ajax/a-close.ftl.
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	at freemarker.core.Expression.isTrue(Expression.java:145)
	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
	at freemarker.core.Environment.visit(Environment.java:208)
	at freemarker.core.MixedContent.accept(MixedContent.java:92)
	at freemarker.core.Environment.visit(Environment.java:208)
	at freemarker.core.Environment.process(Environment.java:188)
	at freemarker.template.Template.process(Template.java:237)
	at
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:182)
	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
	at org.apache.struts2.components.UIBean.end(UIBean.java:513)
	at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
	at
org.apache.jsp.include.admin.path_jsp._jspx_meth_s_005fa_005f1(path_jsp.java:651)
	at
org.apache.jsp.include.admin.path_jsp._jspx_meth_s_005felse_005f1(path_jsp.java:605)
	at
org.apache.jsp.include.admin.path_jsp._jspx_meth_s_005fiterator_005f1(path_jsp.java:513)
	at org.apache.jsp.include.admin.path_jsp._jspService(path_jsp.java:125)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
-- 
View this message in context: http://www.nabble.com/FreeMarker-error-when-trying-to-use-AJAX-Theme-tp22179332p22179332.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: FreeMarker error when trying to use AJAX Theme

Posted by Ignacio de Córdoba <ic...@skios.es>.
thanks for your reply...
If I understood you, then css theme actionerror.ftl or at least simple theme
actionerror.ftl should be picked and rendered. Can you think of the reason
for these templates not shown? (If seen more people with this same problem
asked in forums but now answer to them)

thanks,
Ignacio


mitch.gorman wrote:
> 
> Ignacio de Córdoba wrote:
>> I see actionerror.ftl exists for simple theme but not for ajax theme. Any
>> workarrounds?
>>   
>     i don't have a solution to your actual problem, but the issue you
> note in the sentence above is actually not an issue.  if a template
> doesn't explicitly exist for a theme, the theme's parent is checked, and
> so on.  so for actionerror.ftl, it'd first look for it within ajax.  if
> not found there, it'll look in the xhtml theme.  if it's not there
> either, it'll look in the simple theme.
> 
>     of course, if it's not there, either, then you're well and truly
> screwed... ;)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FreeMarker-error-when-trying-to-use-AJAX-Theme-tp22179332p22238727.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: FreeMarker error when trying to use AJAX Theme

Posted by mitch gorman <mg...@shadowtv.biz>.
Ignacio de Córdoba wrote:
> I see actionerror.ftl exists for simple theme but not for ajax theme. Any
> workarrounds?
>   
    i don't have a solution to your actual problem, but the issue you
note in the sentence above is actually not an issue.  if a template
doesn't explicitly exist for a theme, the theme's parent is checked, and
so on.  so for actionerror.ftl, it'd first look for it within ajax.  if
not found there, it'll look in the xhtml theme.  if it's not there
either, it'll look in the simple theme.

    of course, if it's not there, either, then you're well and truly
screwed... ;)

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


Re: FreeMarker error when trying to use AJAX Theme

Posted by Ignacio de Córdoba <ic...@skios.es>.
I've been doing some changes but now I'm still getting an error related to
the ajax theme...

I see actionerror.ftl exists for simple theme but not for ajax theme. Any
workarrounds?

Thanks for any help


2009-02-24 12:06:37,299 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[local.atlantida.com].[/].[jsp]]
El Servlet.service() para servlet jsp lanzó una excepción
java.io.FileNotFoundException: Template /template/ajax/actionerror.ftl not
found.
	at freemarker.template.Configuration.getTemplate(Configuration.java:489)
	at freemarker.template.Configuration.getTemplate(Configuration.java:452)
	at
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:120)
	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
	at org.apache.struts2.components.UIBean.end(UIBean.java:513)
	at
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
	at
org.apache.jsp.include.admin.error_jsp._jspx_meth_s_005factionerror_005f0(error_jsp.java:355)
	at org.apache.jsp.include.admin.error_jsp._jspService(error_jsp.java:89)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)

-- 
View this message in context: http://www.nabble.com/FreeMarker-error-when-trying-to-use-AJAX-Theme-tp22179332p22179885.html
Sent from the Struts - User mailing list archive at Nabble.com.


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