@Override protected StepProcessingResult determineNextStepNumOnStepProcessing( Service36400234Form form, boolean goback, Map<String, Object> model) { StepProcessingResult stepProcessingResult = super.determineNextStepNumOnStepProcessing(form, goback, model); if ((form.getStepNum() == 1) && !goback) { if (form.getApplType().equals(APPL_FL)) { return new StepProcessingResult(2, "step2-1.html"); } if (form.getApplType().equals(APPL_UL)) { return new StepProcessingResult(2, "step2-2.html"); } } if ((form.getStepNum() == 3) && goback) { if (form.getApplType().equals(APPL_FL)) { return new StepProcessingResult(2, "step2-1.html"); } if (form.getApplType().equals(APPL_UL)) { return new StepProcessingResult(2, "step2-2.html"); } } return stepProcessingResult; }
@Override protected Map<String, Object> formToMap(Service36400234Form form) { Map<String, Object> formAsMap = super.formToMap(form); FormAsMap decoratedFormAsMap = new FormAsMapImpl(formAsMap); decoratedFormAsMap.clearForOrdering(); if (form.getApplType().equals(APPL_FL)) { // Физик clearUlFields(decoratedFormAsMap); } else { // Юрик decoratedFormAsMap.put("firstName", this.getPrivateRoomDataContainer().getFirstName()); decoratedFormAsMap.put("lastName", this.getPrivateRoomDataContainer().getLastName()); decoratedFormAsMap.put("middleName", this.getPrivateRoomDataContainer().getMiddleName()); clearFisFields(decoratedFormAsMap); } return decoratedFormAsMap; }