Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java @ 154:d6b82c585f1f
Bugfix NPE was thrown when an Exception occured in the Called ArtifactDatabase-Server issue58.
gnv/trunk@260 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 22 Oct 2009 12:21:53 +0000 |
parents | c5408b0f34c7 |
children | 013d47662161 |
comparison
equal
deleted
inserted
replaced
153:48f538077aea | 154:d6b82c585f1f |
---|---|
101 .getMessage()); | 101 .getMessage()); |
102 artifactDescription = sm.getArtifactDescription(); | 102 artifactDescription = sm.getArtifactDescription(); |
103 } | 103 } |
104 | 104 |
105 Node currentUI = artifactDescription.getCurrentUI(); | 105 Node currentUI = artifactDescription.getCurrentUI(); |
106 XSLTransformer transformer = new XSLTransformer(); | 106 if (currentUI != null){ |
107 String ui = transformer | 107 XSLTransformer transformer = new XSLTransformer(); |
108 .transform( | 108 Node dynamicUINode = new XMLUtils().getNodeXPath(currentUI,"dynamic"); |
109 new XMLUtils().getNodeXPath(currentUI, | 109 if (dynamicUINode != null){ |
110 "dynamic"), | 110 String ui = transformer |
111 "UTF-8", | 111 .transform( |
112 request | 112 dynamicUINode, |
113 .getRealPath("WEB-INF/config/templates/describe-ui.xsl")); | 113 "UTF-8", |
114 | 114 request |
115 request.setAttribute("ui", ui); | 115 .getRealPath("WEB-INF/config/templates/describe-ui.xsl")); |
116 | 116 |
117 String staticUI = transformer | 117 request.setAttribute("ui", ui); |
118 .transform( | 118 } |
119 new XMLUtils() | 119 |
120 .getNodeXPath(currentUI, "static"), | 120 Node staticUINode = new XMLUtils().getNodeXPath(currentUI, "static"); |
121 "UTF-8", | 121 if (staticUINode != null){ |
122 request | 122 String staticUI = transformer |
123 .getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); | 123 .transform( |
124 request.setAttribute("staticui", staticUI); | 124 staticUINode, |
125 | 125 "UTF-8", |
126 request | |
127 .getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); | |
128 request.setAttribute("staticui", staticUI); | |
129 } | |
130 } | |
126 request.setAttribute("furthertargets", | 131 request.setAttribute("furthertargets", |
127 (ad.getReachableStates() != null && !ad | 132 (ad.getReachableStates() != null && !ad |
128 .getReachableStates().isEmpty())); | 133 .getReachableStates().isEmpty())); |
129 | 134 |
130 } else { | 135 } else { |
152 .getMessage()); | 157 .getMessage()); |
153 artifactDescription = sm.getArtifactDescription(); | 158 artifactDescription = sm.getArtifactDescription(); |
154 } | 159 } |
155 | 160 |
156 Node currentUI = artifactDescription.getCurrentUI(); | 161 Node currentUI = artifactDescription.getCurrentUI(); |
157 XSLTransformer transformer = new XSLTransformer(); | 162 if (currentUI != null){ |
158 String ui = transformer | 163 XSLTransformer transformer = new XSLTransformer(); |
159 .transform( | 164 Node dynamicUINode = new XMLUtils().getNodeXPath(currentUI,"dynamic"); |
160 new XMLUtils().getNodeXPath(currentUI, | 165 if (dynamicUINode != null){ |
161 "dynamic"), | 166 String ui = transformer |
162 "UTF-8", | 167 .transform( |
163 request | 168 dynamicUINode, |
164 .getRealPath("WEB-INF/config/templates/describe-ui.xsl")); | 169 "UTF-8", |
165 | 170 request |
166 request.setAttribute("ui", ui); | 171 .getRealPath("WEB-INF/config/templates/describe-ui.xsl")); |
167 | 172 |
168 String staticUI = transformer | 173 request.setAttribute("ui", ui); |
169 .transform( | 174 } |
170 new XMLUtils() | 175 |
171 .getNodeXPath(currentUI, "static"), | 176 Node staticUINode = new XMLUtils().getNodeXPath(currentUI, "static"); |
172 "UTF-8", | 177 if (staticUINode != null){ |
173 request | 178 String staticUI = transformer |
174 .getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); | 179 .transform( |
175 request.setAttribute("staticui", staticUI); | 180 staticUINode, |
176 | 181 "UTF-8", |
182 request | |
183 .getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); | |
184 request.setAttribute("staticui", staticUI); | |
185 } | |
186 } | |
177 request.setAttribute("furthertargets", false); | 187 request.setAttribute("furthertargets", false); |
178 } | 188 } |
179 return super.execute(mapping, form, request, response); | 189 return super.execute(mapping, form, request, response); |
180 } | 190 } |
181 | 191 |