@RequestMapping(value = "/wfstepAdvanceSearchOperations", method = RequestMethod.POST) public String wfstepAdvanceSearchOperations( @ModelAttribute WFStep wfstep, HttpServletRequest request, HttpServletResponse response, Model model) { wfstep1 = new ArrayList<WFStep>(); String columns = wfstep.getFirstLabel(); String operations = wfstep.getOperations1(); String advanceSearchText = wfstep.getAdvanceSearchText(); // System.out.println("advanceSearchText"+advanceSearchText); // System.out.println("First Labels "+name); // System.out.println("kiran u selected"+name); if (advanceSearchText.length() != 0) { // System.out.println("came to advance"+advanceSearchText.length()); objectsArray = wfstepService.getWFStepAdvance(columns, operations, advanceSearchText); } else { objectsArray = wfstepService.searchWFStep(); } iterator = objectsArray.iterator(); while (iterator.hasNext()) { mm = new com.mnt.erp.bean.WFStep(); objects2 = (Object[]) iterator.next(); mm.setWfstepid((String) objects2[0]); mm.setWfstepStageGUID((String) objects2[1]); mm.setWfstepStep((String) objects2[2]); mm.setWfstepName((String) objects2[3]); mm.setWfstepType((String) objects2[4]); mm.setWfstepStatus((String) objects2[5]); mm.setWfstepAssignedTo((String) objects2[6]); mm.setWfstageName((String) objects2[7]); mm.setRole((String) objects2[8]); /* * String blocked=(String)objects2[13]; if(blocked.equals("0")) { * blocked="YES"; } else { blocked="NO"; } */ wfstep1.add(mm); // System.out.println((String)objects2[0]); } /* * ModelAndView model=new ModelAndView(); * model.setViewName("BomCategorySearch"); * model.addObject("searchBom",BomCategory); return model; */ // return new ModelAndView("MaterialCategorySearch"); request.setAttribute("wfstepSearch", wfstep1); model.addAttribute("wfstepAdd", new WFStep()); return "wfstepHome"; }