您的位置:首页 > 其它

OA项目第二天:后端页面的显示

2014-04-25 16:41 134 查看
后端页面的显示使用的是frameset标签:上下左右,好处是可以实现点击左边列表,右边变化的效果!!









查看链接上述代码非常重要,查看链接

域中的数据来源监听器



cn.itcast.oa.util.InitListener






public class InitListener implements ServletContextListener
{

public void
contextInitialized(ServletContextEvent sce) {

// 获取容器与相关的Service对象

ApplicationContext ac =
WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());

PrivilegeService
privilegeService = (PrivilegeService)
ac.getBean("privilegeServiceImpl");

//
准备数据:topPrivilegeList

List topPrivilegeList =
privilegeService.findTopList();

sce.getServletContext().setAttribute("topPrivilegeList",
topPrivilegeList);

System.out.println("------------>
已准备数据topPrivilegeList <------------");

//
准备数据:allPrivilegeUrls

Collection allPrivilegeUrls =
privilegeService.getAllPrivilegeUrls();

sce.getServletContext().setAttribute("allPrivilegeUrls",
allPrivilegeUrls);

System.out.println("------------>
已准备数据allPrivilegeUrls <------------");

}

public void
contextDestroyed(ServletContextEvent arg0) {

}

}







内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐