# HG changeset patch # User Tim Englich # Date 1253197816 0 # Node ID 87002cbd194c8fd8a1b2c48a99fe507e77426c71 # Parent d7e5a929fc347732ffa4c46eac66544de3aa637c Static UI -integration an some refactoringwork done gnv/trunk@103 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r d7e5a929fc34 -r 87002cbd194c gnv/Changelog --- a/gnv/Changelog Wed Sep 16 14:55:54 2009 +0000 +++ b/gnv/Changelog Thu Sep 17 14:30:16 2009 +0000 @@ -1,3 +1,35 @@ +2009-09-17 Tim Englich + + * src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: + Some Refactoring work done. + * src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl: + Added XSL-Template for Transforming the stazic UI + * src/main/webapp/WEB-INF/jsp/includes/display_fis_inc.jsp: + Refactored FIS Rendering to it's own Include-File + * src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp: + Refactored Diagramm Rendering to it's own Include-File + * src/main/webapp/WEB-INF/jsp/index.jsp: + Some Refactoring Work done. + * src/main/webapp/styles/default.css: + Some Changes in DIV-Formatting to get a propper Layout. + + * src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java (NextArtifactStepAction): + Static UI integrated + +2009-09-17 Tim Englich + + * src/main/webapp/WEB-INF/jsp/includes/display_fis_inc.jsp: + Refactored FIS Rendering to it's own Include-File + * src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp: + Refactored Diagramm Rendering to it's own Include-File + * src/main/webapp/WEB-INF/jsp/index.jsp: + Some Refactoring Work done. + * src/main/webapp/styles/default.css: + Some Changes in DIV-Formatting to get a propper Layout. + + * src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java (NextArtifactStepAction): + Static UI integrated + 2009-09-16 Tim Englich * src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java (execute) Edited: diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java --- a/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java Wed Sep 16 14:55:54 2009 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java Thu Sep 17 14:30:16 2009 +0000 @@ -14,6 +14,7 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.w3c.dom.Node; import de.intevation.gnv.action.sessionmodel.SessionModel; import de.intevation.gnv.action.sessionmodel.SessionModelFactory; @@ -22,6 +23,7 @@ import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription; import de.intevation.gnv.artifactdatabase.objects.DefaultInputParameter; import de.intevation.gnv.artifactdatabase.objects.InputParameter; +import de.intevation.gnv.util.XMLUtils; import de.intevation.gnv.util.XSLTransformer; /** @@ -66,15 +68,18 @@ if (ad.getReachableStates() != null && !ad.getReachableStates().isEmpty()){ // TODO: Woher kommt der zu erreichende Status; String target = ad.getReachableStates().iterator().next(); - ArtifactDescription artifactDescription = adc.doNextStep(sm.getSelectedArtifactFactory(), sm.getCurrentArtifact(), target, ips); + Node currentUI = artifactDescription.getCurrentUI(); XSLTransformer transformer = new XSLTransformer(); - String ui = transformer.transform(artifactDescription.getCurrentUI(), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui.xsl")); + String ui = transformer.transform(new XMLUtils().getNodeXPath(currentUI, "dynamic"), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui.xsl")); request.setAttribute("ui", ui); + String staticUI = transformer.transform(new XMLUtils().getNodeXPath(currentUI, "static"), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); + request.setAttribute("staticui", staticUI); + request.setAttribute("furthertargets", (ad.getReachableStates() != null && !ad.getReachableStates().isEmpty())); }else{ @@ -88,10 +93,15 @@ ArtifactDescription artifactDescription = adc.getCurrentStepDescription(sm.getSelectedArtifactFactory(), sm.getCurrentArtifact()); + Node currentUI = artifactDescription.getCurrentUI(); XSLTransformer transformer = new XSLTransformer(); - String ui = transformer.transform(artifactDescription.getCurrentUI(), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui.xsl")); + String ui = transformer.transform(new XMLUtils().getNodeXPath(currentUI, "dynamic"), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui.xsl")); + + request.setAttribute("ui", ui); - request.setAttribute("ui", ui); + String staticUI = transformer.transform(new XMLUtils().getNodeXPath(currentUI, "static"), "UTF-8", request.getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); + request.setAttribute("staticui", staticUI); + request.setAttribute("furthertargets",false); } diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl Thu Sep 17 14:30:16 2009 +0000 @@ -0,0 +1,52 @@ + + + + + + +
+
+
+ + +
+
+
  +
+ + +
+
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + :
+
+ + + +
\ No newline at end of file diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl --- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl Wed Sep 16 14:55:54 2009 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl Thu Sep 17 14:30:16 2009 +0000 @@ -6,9 +6,6 @@ xmlns:art="http://www.intevation.de/2009/artifacts"> - - - diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp Thu Sep 17 14:30:16 2009 +0000 @@ -0,0 +1,6 @@ +<%Object diagramm = request.getAttribute("diagramm");%> +<%if (diagramm != null){ %> +
+ <%=diagramm.toString()%> +
+<%}%> \ No newline at end of file diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/webapp/WEB-INF/jsp/includes/display_fis_inc.jsp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_fis_inc.jsp Thu Sep 17 14:30:16 2009 +0000 @@ -0,0 +1,29 @@ +<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> +<%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> +<%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> +<%@page import="java.util.Collection"%> +<%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%> +<%@page import="java.util.Iterator"%> +<% + SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); + Collection artifactFactories = sm.getArtifactFactories(); +%> +
+
+
+ + <%if (artifactFactories != null){%> + + + <%}%> +
+ " /> +
+
+
\ No newline at end of file diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/webapp/WEB-INF/jsp/index.jsp --- a/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Wed Sep 16 14:55:54 2009 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Thu Sep 17 14:30:16 2009 +0000 @@ -1,56 +1,38 @@ - +<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@page import="java.util.Collection"%> <%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%> <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> <%@page import="java.util.Iterator"%> <%Object ui = request.getAttribute("ui"); + Object staticui = request.getAttribute("staticui"); boolean furthertargets = true; Object furthertargetsObject = request.getAttribute("furthertargets"); if (furthertargetsObject != null){ furthertargets = ((Boolean)furthertargetsObject).booleanValue(); } - Object diagramm = request.getAttribute("diagramm"); - String action = (ui == null ? "selectArtifactFactory.do" : "next.do"); %> -
-
-
- - <% - - SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); - Collection artifactFactories = sm.getArtifactFactories(); - if (artifactFactories != null && ui == null){ - %> - FIS - - <% - } - %> - - - <%=ui != null ? ui.toString() : "" %> - - " /> -
-
-
-<%if (diagramm != null){ %> -
- <%=diagramm.toString()%> -
-<%}%> \ No newline at end of file +
+ + <%if (staticui != null){ %> + <%=staticui.toString()%> + <%}%> + + <%if (ui != null){%> +
+
+
+ <%=ui != null ? ui.toString() : "" %> +
+ <%if(furthertargets){%> + "/> + <%}else{%> + "/> + <%}%> +
+
+
+ <%}%> +
+ \ No newline at end of file diff -r d7e5a929fc34 -r 87002cbd194c gnv/src/main/webapp/styles/default.css --- a/gnv/src/main/webapp/styles/default.css Wed Sep 16 14:55:54 2009 +0000 +++ b/gnv/src/main/webapp/styles/default.css Thu Sep 17 14:30:16 2009 +0000 @@ -212,8 +212,8 @@ /*POSITION DEFINIEREN*/ /* border: 1px solid crimson;*/ position: absolute; - top: 170px; - left: 300px; + top: 65px; + left: 350px; } div#export { @@ -295,15 +295,15 @@ left:410px; } -body > div#page >div#basefilter { +div#basefilter { margin-top: 30px; - float: left; - width: 300px; + width: 325px; } div#timeseriesfilter { margin-top: 1px; padding: 0px; + width: 325px; } #timeRangeForm label {