⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

I have db which has the details of Employee.When i want to insert details into which already exists it should show error msg.



Sanjana

Sanjana
  • profile picture
  • Member

Posted 03 August 2015 - 06:56 AM

 
@RequestMapping("/insert")  
public String insertEmpDetails(@ModelAttribute("employee") Employee emp) {
 empService.insertEmpDetails(emp);  
 return "redirect:/getList";
}  
 
@RequestMapping("/getList")  
public ModelAndView getEmpList() {  
 
 List<Employee> empList = empService.getEmpList();  
 return new ModelAndView("empList", "empList", empList);  
}  
 
@RequestMapping("/update")  
public String updateEmpDetails(@ModelAttribute Employee emp) {  
 empService.updateEmpDetails(emp);  
 return "redirect:/getList";  
}  
 

Please give me the solution


Paul Savostin

Paul Savostin
  • profile picture
  • Member

Posted 03 August 2015 - 10:42 AM

Hi! I dont see any GC code... And this is code not the CI I think?

It seems like Java language using Spring framework :)


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 05 August 2015 - 14:30 PM

Well Paul - he seems to be inspired much by GC ...