diff gnv/src/main/webapp/WEB-INF/jsp/header.jsp @ 166:c5edd8fcae8c

Added localized Exception Messages. Added CSS-Entry for the Exception Message Container and put the div at a proper place. gnv/trunk@331 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 12 Nov 2009 15:30:28 +0000
parents cfe6467d3b7b
children b5733f9f386b
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/header.jsp	Thu Nov 12 11:03:11 2009 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/header.jsp	Thu Nov 12 15:30:28 2009 +0000
@@ -1,10 +1,14 @@
-<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
-	language="java"%>
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" language="java"%>
 <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-el" prefix="bean-el" %>
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
 <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
-<% Object exceptionMessage = request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID);%>
+<% Object exceptionMessage = request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID);
+    exceptionMessage = (exceptionMessage != null ? exceptionMessage.toString().replaceAll(" ", ".").replaceAll(":",".").toLowerCase() : null);
+    exceptionMessage = (exceptionMessage != null && exceptionMessage.toString().endsWith(".") ? exceptionMessage.toString().substring(0,exceptionMessage.toString().length()-1) : exceptionMessage);
+    
+%>
 <%@page import="de.intevation.gnv.action.CommunicationKeys"%><html:xhtml />
 <!-- Kopfleiste-->
 <div id="head" title="GDI BSH genericViewer"> 
@@ -28,9 +32,12 @@
 			
 		</div>
 		<br/>
-		<div class="errormsg" id="load_error">
-			<%=exceptionMessage != null ? exceptionMessage.toString():"" %>
-		</div>
+		
 	</div>
+	<div class="errormsg" id="load_error">
+         <%if (exceptionMessage != null){ %>
+            <bean-el:message key="<%=exceptionMessage.toString()%>"/>
+         <%}%>
+     </div>
 </div>
 

http://dive4elements.wald.intevation.org