com.github.dactiv.showcase.web.account
类 GroupController

java.lang.Object
  继承者 com.github.dactiv.showcase.web.account.GroupController

@Controller
@RequestMapping(value="/account/group")
public class GroupController
extends Object

组管理Controller

作者:
maurice

构造方法摘要
GroupController()
           
 
方法摘要
 Group bindingModel(String id)
          绑定实体数据,如果存在id时获取后从数据库获取记录,进入到相对的C后在将数据库获取的记录填充到相应的参数中
 String delete(List<String> ids, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
          通过主键id集合删除组,删除成功后重定向到:account/group/view
 void read(String id, org.springframework.ui.Model model)
          读取组信息,返回account/group/read.html页面
 String save(Group entity, javax.servlet.http.HttpServletRequest request, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
          保存或更新组,保存成功后重定向到:account/group/view
 List<Group> view()
          获取组列表,返回account/group/view.html页面
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

GroupController

public GroupController()
方法详细信息

view

@RequestMapping(value="view")
public List<Group> view()
获取组列表,返回account/group/view.html页面

返回:
Page

save

@RequestMapping(value="save")
public String save(@ModelAttribute(value="entity")
                                  Group entity,
                                  javax.servlet.http.HttpServletRequest request,
                                  org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
保存或更新组,保存成功后重定向到:account/group/view

参数:
entity - 实体信息
request - HttpServletRequest
redirectAttributes - spring mvc 重定向属性
返回:
String

read

@RequestMapping(value="read")
public void read(String id,
                                org.springframework.ui.Model model)
读取组信息,返回account/group/read.html页面

参数:
id - 主键id
model - Spring mvc的Model接口,主要是将model的属性返回到页面中

delete

@RequestMapping(value="delete")
public String delete(@RequestParam(value="ids")
                                    List<String> ids,
                                    org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
通过主键id集合删除组,删除成功后重定向到:account/group/view

参数:
ids - 主键id集合
redirectAttributes - spring mvc 重定向属性
返回:
String

bindingModel

@ModelAttribute(value="entity")
public Group bindingModel(String id)
绑定实体数据,如果存在id时获取后从数据库获取记录,进入到相对的C后在将数据库获取的记录填充到相应的参数中

参数:
id - 主键ID


Copyright © 2014. All rights reserved.