ADF取得session,调用pop

常用到的小代码

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();");
}

你可能感兴趣的:(session)