public Results insert(HashMap<String, String> params, Form form) { int index = 0, size = form.getNumSections(); FormDescription fd = Resources.formDescriptions.get(form.getApplication() + form.getCode()); SectionDescription currentSec = null; SectionService service = null; System.out.println(form.toString()); for (index = 0; index <= size; index++) { currentSec = fd.getSection(index); service = GenericSectionService.getSectionService(response, currentSec.getSaveClass()); if (service == null) break; response = service.insert(params, fd, currentSec, form, form.getSection(index)); if (response.getCode() != Codes.OK) break; } return response; }