# HG changeset patch # User Tim Englich # Date 1269251388 0 # Node ID 8315b0a40329f4a608844cb39b824e018adca2a5 # Parent 707e142e7d4444b21fe22189893aba5e8278a468 Improved ExceptionHandling during WMS-Publishing. gnv/trunk@812 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 707e142e7d44 -r 8315b0a40329 gnv/ChangeLog --- a/gnv/ChangeLog Fri Mar 19 13:15:59 2010 +0000 +++ b/gnv/ChangeLog Mon Mar 22 09:49:48 2010 +0000 @@ -1,3 +1,10 @@ +2010-03-22 Tim Englich + + * src/main/webapp/WEB-INF/jsp/wmslayout.jsp, + src/main/java/de/intevation/gnv/action/WMSAction.java (execute): + Improved ExceptionHandling during WMS-Publishing. + Now the OL-GUI will only be shown if the WMS was published succsessfull. + 2010-03-19 Tim Englich * src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java (publishWMS), diff -r 707e142e7d44 -r 8315b0a40329 gnv/src/main/java/de/intevation/gnv/action/WMSAction.java --- a/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java Fri Mar 19 13:15:59 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java Mon Mar 22 09:49:48 2010 +0000 @@ -123,6 +123,7 @@ if (mapserverPath != null && mapfilePath != null && layer != null){ + request.setAttribute("wms_published", Boolean.TRUE); return super.execute(mapping, form, request, response); }else{ return super.getExceptionForward(mapping); diff -r 707e142e7d44 -r 8315b0a40329 gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp --- a/gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp Fri Mar 19 13:15:59 2010 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/wmslayout.jsp Mon Mar 22 09:49:48 2010 +0000 @@ -29,6 +29,7 @@ var map, layer; function init() { + <%if(request.getAttribute("wms_published") != null){ %> map = new OpenLayers.Map('map'); var server = '<%=serverPath%>?MAP=<%=mapfilePath%>'; layer = new OpenLayers.Layer.WMS( @@ -45,6 +46,7 @@ map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); + <%}%> } @@ -62,7 +64,7 @@ - + <%if(request.getAttribute("wms_published") != null){ %>
@@ -78,6 +80,7 @@
+ <%}%>