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) {
}
}
查看链接上述代码非常重要,查看链接
域中的数据来源监听器
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) {
}
}
相关文章推荐
- OA项目页面显示异常,找不到正确路径问题
- 图片全部加载完成之后再显示页面ui,公司项目里用上,自己写的几行代码
- web项目改个名字后无法显示页面
- JAVA_OA(十四):SSM练手项目bug-JSP页面传递参数的编码问题
- Jsp在页面内显示本项目的路径
- 夺命雷公狗ThinkPHP项目之----企业网站24之网站前台列表页面包屑导航的显示
- C#主要用于查询sql的web项目:查询以及页面显示数据非常缓慢的改进方案
- java web项目配置错误页面(error page )IE不显示配置的错误页面
- tomcat在ubuntu下启动成功但不显示欢迎页面,也启动不了struts2项目
- 技术文章 | nginx lua 小项目:根据 user_agent 显示不同的页面_附带和 php 性能的对比
- Struct2或者SSH项目中,在JSP页面显示Action中注册的错误信息
- 使用IntelliJ IDEA开发Java Web项目时,修改了JSP后刷新浏览器无法及时显示修改后的页面
- Maven项目启动时如何查找默认的显示页面
- 【SSH网上商城项目实战22】获取银行图标以及支付页面的显示
- 解决IDEA开发JavaWeb项目修改了HTML或Servlet/JSP后刷新浏览器无法及时显示修改后的页面的问题
- 基于thinkphp框架开发的项目在lnmp环境下,出现除了主页能显示,访问其他页面都抛出404异常
- 前后端分离的j2ee的web项目,使用vue方式,即{{}}方式批量传入前端参数,遇到一个一个问题,页面上一开始有{{}},怎么处理?
- 页面foreach遍历显示数据时,当要操作某个具体项目时,项目id只能从遍历项目体里传递出来。---循环体里的,动态的页面条目,比较抽象【很容易忘!牢记思路】
- OA项目左边页面的代码!
- OA项目实战学习(5)——部门树形结构显示