ADF取得session,调用pop

来源:互联网 发布:wf入门到精通源码 编辑:程序博客网 时间:2024/05/16 08:07

常用到的小代码

    public HttpSession getSession() {
           FacesContext context = FacesContext.getCurrentInstance();
           ExternalContext externalContext = context.getExternalContext();
           HttpServletRequest request =
               (HttpServletRequest)externalContext.getRequest();
           HttpSession session = request.getSession();
           return session;
       }
    public void usePopu(){
        FacesContext facesContext = FacesContext.getCurrentInstance();
         ExtendedRenderKitService service =Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
            service.addScript(facesContext, "AdfPage.PAGE.findComponent('p1').show();");
       }
0 0
原创粉丝点击