/** * Redirects to different view by checking the view type. * * @return the result code. * @throws Exception if there is error. */ @Override public String execute() throws Exception { String resultCode = super.execute(); if (SUCCESS.equals(resultCode)) { if (formData.getViewType().equals(ProjectMilestoneViewForm.LIST_VIEW)) { return ProjectMilestoneViewForm.LIST_VIEW; } if (formData.getViewType().equals(ProjectMilestoneViewForm.CALENDAR_VIEW)) { return ProjectMilestoneViewForm.CALENDAR_VIEW; } if (formData.getViewType().equals(ProjectMilestoneViewForm.MULTIPLE_CREATION_VIEW)) { return ProjectMilestoneViewForm.MULTIPLE_CREATION_VIEW; } } return resultCode; }