You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "James Holmes (JIRA)" <ji...@apache.org> on 2007/08/01 17:42:05 UTC

[jira] Updated: (WW-2080) actionError, actionMessage and fieldError Freemarker templates do not honor the cssClass and cssStyle attributes

     [ https://issues.apache.org/struts/browse/WW-2080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2080:
-----------------------------

    Summary: actionError, actionMessage and fieldError Freemarker templates do not honor the cssClass and cssStyle attributes  (was: fielderror.ftl in the simple theme does not honor the cssClass or cssStyle attributes)

> actionError, actionMessage and fieldError Freemarker templates do not honor the cssClass and cssStyle attributes
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2080
>                 URL: https://issues.apache.org/struts/browse/WW-2080
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.9
>            Reporter: Brian Ploetz
>            Assignee: James Holmes
>
> Setting the "cssClass" or "cssStyle" attributes on a <s:fielderror> tag has no impact. The fielderror.ftl file uses a hard coded css class "errorMessage":
> 		<ul>
> 			<#list eKeys as eKey><#t/>
> 				<#assign eValue = fieldErrors[eKey]><#t/>
> 				<#list eValue as eEachValue><#t/>
> 					<li><span class="errorMessage">${eEachValue}</span></li>
> 				</#list><#t/>
> 			</#list><#t/>
> 		</ul>
> If you take a look at another tag which does honor the cssClass and cssStyle attributes, they look for the existence of these attributes and swap them in if they're specified. For example, select.ftl:
> <#if parameters.cssClass?exists>
>  class="${parameters.cssClass?html}"<#rt/>
> </#if>
> <#if parameters.cssStyle?exists>
>  style="${parameters.cssStyle?html}"<#rt/>
> </#if>

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