Commits

Anonymous committed d2fb085

Issue number: ww-1044, ww-1038, ww-1035

moved the rendering for actionerror, actionmessage and fielderror from xhtml them to simple them. xhtml theme now includes the ftl files. previously simple theme ftl files are empty (they don't render any of those messages/errors) now they do

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@1894573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (6)

src/java/template/simple/actionerror.ftl

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

src/java/template/simple/actionmessage.ftl

+<#if (actionMessages?exists && actionMessages?size > 0)>
+	<ul>
+		<#list actionMessages as message>
+			<li><span class="actionMessage">${message}</span></li>
+		</#list>
+	</ul>
+</#if>

src/java/template/simple/fielderror.ftl

+<#assign eKeys = fieldErrors.keySet()>
+<#assign eKeysSize = eKeys.size()>
+<#assign doneStartUlTag=false>
+<#assign doneEndUlTag=false>
+<#assign haveMatchedErrorField=false>
+<#if (fieldErrorFieldNames?size > 0) >
+	<#list fieldErrorFieldNames as fieldErrorFieldName>
+		<#list eKeys as eKey>
+		<#if (eKey = fieldErrorFieldName)>
+			<#assign haveMatchedErrorField=true>
+			<#assign eValue = fieldErrors[fieldErrorFieldName]>
+			<#if (haveMatchedErrorField && (!doneStartUlTag))>
+				<ul>
+				<#assign doneStartUlTag=true>
+			</#if>
+			<#list eValue as eEachValue>
+				<li><span class="errorMessage">${eEachValue}</span></li>
+			</#list>			
+		</#if>
+		</#list>
+	</#list>
+	<#if (haveMatchedErrorField && (!doneEndUlTag))>
+		</ul>
+		<#assign doneEndUlTag=true>
+	</#if>
+<#else>	
+	<#if (eKeysSize > 0)>
+		<ul>
+			<#list eKeys as eKey>
+				<#assign eValue = fieldErrors[eKey]>
+				<#list eValue as eEachValue>
+					<li><span class="errorMessage">${eEachValue}</span></li>
+				</#list>
+			</#list>
+		</ul>
+	</#if>
+</#if>
+

src/java/template/xhtml/actionerror.ftl

-<#if (actionErrors?exists && actionErrors?size > 0)>
-	<ul>
-	<#list actionErrors as error>
-		<li><span class="errorMessage">${error}</span></li>
-	</#list>
-	</ul>
-</#if>
+<#include "/${parameters.templateDir}/simple/actionerror.ftl" />

src/java/template/xhtml/actionmessage.ftl

-<#if (actionMessages?exists && actionMessages?size > 0)>
-	<ul>
-		<#list actionMessages as message>
-			<li><span class="actionMessage">${message}</span></li>
-		</#list>
-	</ul>
-</#if>
+<#include "/${parameters.templateDir}/simple/actionmessage.ftl" />

src/java/template/xhtml/fielderror.ftl

-<#assign eKeys = fieldErrors.keySet()>
-<#assign eKeysSize = eKeys.size()>
-<#assign doneStartUlTag=false>
-<#assign doneEndUlTag=false>
-<#assign haveMatchedErrorField=false>
-<#if (fieldErrorFieldNames?size > 0) >
-	<#list fieldErrorFieldNames as fieldErrorFieldName>
-		<#list eKeys as eKey>
-		<#if (eKey = fieldErrorFieldName)>
-			<#assign haveMatchedErrorField=true>
-			<#assign eValue = fieldErrors[fieldErrorFieldName]>
-			<#if (haveMatchedErrorField && (!doneStartUlTag))>
-				<ul>
-				<#assign doneStartUlTag=true>
-			</#if>
-			<#list eValue as eEachValue>
-				<li><span class="errorMessage">${eEachValue}</span></li>
-			</#list>			
-		</#if>
-		</#list>
-	</#list>
-	<#if (haveMatchedErrorField && (!doneEndUlTag))>
-		</ul>
-		<#assign doneEndUlTag=true>
-	</#if>
-<#else>	
-	<#if (eKeysSize > 0)>
-		<ul>
-			<#list eKeys as eKey>
-				<#assign eValue = fieldErrors[eKey]>
-				<#list eValue as eEachValue>
-					<li><span class="errorMessage">${eEachValue}</span></li>
-				</#list>
-			</#list>
-		</ul>
-	</#if>
-</#if>
-
+<#include "/${parameters.templateDir}/simple/fielderror.ftl" />