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('");
.....
.
.
本文介绍了一种使用JavaServer Faces (JSF) 和 HTML 在 Web 应用中创建模式窗口的方法。通过设置 HTTP 响应的内容类型为 HTML,并利用 JavaScript 的 showModalDialog 方法,可以实现在 JSF 应用中显示自定义的模式对话框。
2104

被折叠的 条评论
为什么被折叠?



