protected ModelAppResponse handleSubmit(Map<String, String> urlParameters, ModelUser user) throws ParseException {
		try {
			String id = urlParameters.get("id");
			if (id == null || id.isEmpty()) {
				insert(parseSubmitParamsInsert(urlParameters, user));
			} else {
				update(parseSubmitParamsUpdate(urlParameters, user));
			}
			return ModelAppResponse.responseRedirect(getMainPageUrl());
		} catch (Exception e) {
			String linkToMenu = "<a href='/" + getMainPageUrl() + "'>Click here to go back</a>";
			ModelAppResponse appResponse = ModelAppResponse.responseError(e);
			appResponse.setBody(linkToMenu.getBytes());
			return appResponse;
		}
	}