You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Bruno Luiz Pereira da Silva (JIRA)" <ji...@apache.org> on 2007/10/03 15:00:45 UTC

[jira] Created: (WW-2229) s:actionError tag ignores theme=simple

s:actionError tag ignores theme=simple
--------------------------------------

                 Key: WW-2229
                 URL: https://issues.apache.org/struts/browse/WW-2229
             Project: Struts 2
          Issue Type: Bug
          Components: API
    Affects Versions: 2.0.9
         Environment: Windows XP Professional + Apache Tomcat 5.5.20 Pentium 4 2.8 GHz 32 bits
AND
Kubuntu 7.04 + Apache Tomcat 5.5.23 Pentium D 2.8 GHz 32 bits
            Reporter: Bruno Luiz Pereira da Silva
            Priority: Critical


Trying to use the <s:actionError> tag, we've encountered problems to display only the error message. It wasn't possible to simply display the error message string, without html injection.

Analyzing the struts-core package, we have found the following content inside the "actionerror.ftl":

<#if (actionErrors?exists && actionErrors?size > 0)>
	<ul>
	<#list actionErrors as error>
		<li><span class="errorMessage">${error}</span></li>
	</#list>
	</ul>
</#if>

I don't know deeply the internals of the Struts 2 taglib API, but this seems to indicate that the <s:actionError> tag simply ignores the "theme" attribute, and always injects this template html.

Please help us telling how we can manage to display only the error message string, without this html template.

Thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WW-2229) s:actionError tag ignores theme=simple

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes closed WW-2229.
----------------------------

    Resolution: Not A Problem

Questions like this should be posted on the Struts users mailing list instead of opening a JIRA ticket:

http://struts.apache.org/mail.html

What you need to do is simply provide a custom template for the <s:actionError> tag that does not output any HTML.

You can find more information on how the tags and templates work in Struts 2 on this page:

http://struts.apache.org/2.0.9/docs/themes-and-templates.html

> s:actionError tag ignores theme=simple
> --------------------------------------
>
>                 Key: WW-2229
>                 URL: https://issues.apache.org/struts/browse/WW-2229
>             Project: Struts 2
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.0.9
>         Environment: Windows XP Professional + Apache Tomcat 5.5.20 Pentium 4 2.8 GHz 32 bits
> AND
> Kubuntu 7.04 + Apache Tomcat 5.5.23 Pentium D 2.8 GHz 32 bits
>            Reporter: Bruno Luiz Pereira da Silva
>            Priority: Critical
>
> Trying to use the <s:actionError> tag, we've encountered problems to display only the error message. It wasn't possible to simply display the error message string, without html injection.
> Analyzing the struts-core package, we have found the following content inside the "actionerror.ftl":
> <#if (actionErrors?exists && actionErrors?size > 0)>
> 	<ul>
> 	<#list actionErrors as error>
> 		<li><span class="errorMessage">${error}</span></li>
> 	</#list>
> 	</ul>
> </#if>
> I don't know deeply the internals of the Struts 2 taglib API, but this seems to indicate that the <s:actionError> tag simply ignores the "theme" attribute, and always injects this template html.
> Please help us telling how we can manage to display only the error message string, without this html template.
> Thanks in advance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.