findroleaction.java

来自「菲律宾的一个大学的图书管理系统 spring+hibernate+veloci」· Java 代码 · 共 23 行

JAVA
23
字号
package biz.bluesky.pts.action;

import org.apache.struts.action.*;
import javax.servlet.http.*;

import biz.bluesky.pts.service.*;

import java.util.*;
public class FindRoleAction extends BaseAction {
  public ActionForward execute(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{
    /**@todo: complete the business logic here, this is just a skeleton.*/
    IRoleService roleService = (IRoleService)getServiceBean("RoleService");
    
    List roles = roleService.findRoles();
    if(roles.size()>0){
      request.setAttribute("roles",roles);
      return mapping.findForward("FindRole");
    }else{
      return mapping.findForward("NoData");
    }
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?