Package com.fengjing.framework.springmvc.model

Examples of com.fengjing.framework.springmvc.model.Contact


   * @param id
   * @return
   */
  @RequestMapping(value="/xml/{id}",produces=MediaType.APPLICATION_XML_VALUE)
  public @ResponseBody Contact getContactInXML(@PathVariable(value="id")int id){
    Contact contact = contactService.findById(id);
    return contact;
  }
View Full Code Here


   *
   * @return
   */
  @RequestMapping(value="/npage",method=RequestMethod.GET)
  public ModelAndView newModelPage(){
    return new ModelAndView("contact","model",new Contact());//��ת��contact.jsp ģ�͵�����Ϊmodel
  }
View Full Code Here

   * @return
   */
  @RequiresRoles("User")
  @RequestMapping(value="/modify/{id}")
  public ModelAndView modifyPage(@PathVariable(value="id")Integer id){
    Contact contact = contactService.findById(id);
    ModelAndView modelAndView=new ModelAndView();
    modelAndView.setViewName("modifycontact");//��ת��modifycontact.jsp
    modelAndView.addObject("model", contact);//ģ�͵�����model
    return modelAndView;
  }
View Full Code Here

  @Resource
  ContactService contactService;
 
  @RequestMapping(value="/json/{id}",produces=MediaType.APPLICATION_JSON_VALUE)
  public @ResponseBody Contact getContactInJson(@PathVariable(value="id")int id){
    Contact contact = contactService.findById(id);
    return contact;
  }
View Full Code Here

TOP

Related Classes of com.fengjing.framework.springmvc.model.Contact

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.