http://hi.baidu.com/jsfcn/blog/item/228101553aa2fdc0b645ae14.html
- FacesContext ctx = FacesContext.getCurrentInstance();
- String contentType = "text/html;charset=utf-8";
- HttpServletResponse response = (HttpServletResponse) ctx
- .getExternalContext().getResponse();
- response.setContentType(contentType);
- ServletOutputStream out = response.getOutputStream();
- StringBuffer buf = new StringBuffer();
- buf.append("<script type=\"text/javascript\">\n");
- buf.append("<!--\n");
-
- buf.append("var rtn=window.showModalDialog('");
- .....