# HG changeset patch # User Tim Englich # Date 1255948228 0 # Node ID c5408b0f34c7da67f4888d938a18456e0f5d66a8 # Parent 9b7f74e58f8db9e9dff6773d340cfd6a6c063fe7 Now the UI will compelte be shown if the User has done an Mistake entering values to input-fields eg. Coordinates or formatted Date-Strings. issue 35 gnv/trunk@242 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 9b7f74e58f8d -r c5408b0f34c7 gnv/ChangeLog --- a/gnv/ChangeLog Mon Oct 19 09:10:15 2009 +0000 +++ b/gnv/ChangeLog Mon Oct 19 10:30:28 2009 +0000 @@ -1,5 +1,11 @@ 2009-10-19 Tim Englich + * src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java (execute): + Now the UI will compelte be shown if the User has done an Mistake entering + values to input-fields eg. Coordinates or formatted Date-Strings. issue 35 + +2009-10-19 Tim Englich + * src/main/resources/applicationMessages_en.properties: Changed Lablevalues according to issue47 * src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: diff -r 9b7f74e58f8d -r c5408b0f34c7 gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java --- a/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java Mon Oct 19 09:10:15 2009 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java Mon Oct 19 10:30:28 2009 +0000 @@ -55,7 +55,6 @@ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - try { log.debug("NextArtifactStepAction.execute"); SessionModel sm = SessionModelFactory.getInstance() .getSessionModel(request); @@ -90,9 +89,18 @@ target = ad.getReachableStates().iterator().next(); } - ArtifactDescription artifactDescription = adc.doNextStep(sm - .getSelectedArtifactFactory(), sm.getCurrentArtifact(), - target, ips); + ArtifactDescription artifactDescription; + try { + artifactDescription = adc.doNextStep(sm.getSelectedArtifactFactory(), + sm.getCurrentArtifact(), + target, ips); + } catch (Exception e) { + log.error(e, e); + request.setAttribute( + CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e + .getMessage()); + artifactDescription = sm.getArtifactDescription(); + } Node currentUI = artifactDescription.getCurrentUI(); XSLTransformer transformer = new XSLTransformer(); @@ -120,23 +128,30 @@ .getReachableStates().isEmpty())); } else { - - adc.doFeed(sm.getSelectedArtifactFactory(), sm - .getCurrentArtifact(), ips); - - request.setAttribute("diagramm", true); - // statistic abholen und in das sessionmodell schreiben. - - Collection statistics = adc - .calculateStatistics(sm.getSelectedArtifactFactory(), - sm.getCurrentArtifact()); - sm.setStatistics(statistics); - - ArtifactDescription artifactDescription = adc - .getCurrentStepDescription(sm - .getSelectedArtifactFactory(), sm - .getCurrentArtifact()); + ArtifactDescription artifactDescription; + try{ + adc.doFeed(sm.getSelectedArtifactFactory(), sm + .getCurrentArtifact(), ips); + + Collection statistics = adc + .calculateStatistics(sm.getSelectedArtifactFactory(), + sm.getCurrentArtifact()); + sm.setStatistics(statistics); + artifactDescription = adc + .getCurrentStepDescription(sm + .getSelectedArtifactFactory(), sm + .getCurrentArtifact()); + + request.setAttribute("diagramm", true); + + } catch (Exception e) { + log.error(e, e); + request.setAttribute( + CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e + .getMessage()); + artifactDescription = sm.getArtifactDescription(); + } Node currentUI = artifactDescription.getCurrentUI(); XSLTransformer transformer = new XSLTransformer(); @@ -162,13 +177,6 @@ request.setAttribute("furthertargets", false); } return super.execute(mapping, form, request, response); - } catch (Exception e) { - log.error(e, e); - request.setAttribute( - CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e - .getMessage()); - return super.getExceptionForward(mapping); - } } }