Paul,
I recently had to implement a "please wait" page, though my requirements
were slightly different. I was redirecting to a non-JSF page (Crystal
Reports viewer, from the JRC in fact). Since the crystal JSP would block
until the query was finished, I simply displayed my wait page once, and
then immediately forwarded to the results page. The results page
wouldn't write anything out until it was all ready, so the wait page
stays on screen.
You will doubtless need a slightly different approach, but if it helps
any, you can take a look at what I came up with. It is based off of some
generic JSP wait page example I found online.
See attachment (assuming the attachment worked)
Regards,
Jeff Bischoff
Kenneth L Kurz & Associates, Inc.
Paul Spencer wrote:
I need to implement a "Processing, please wait..." page that is
displayed when a long query is running. The backing bean currently has
a method that returns "processing" or "done" to indicate the processing
state of the query. When "processing" is returned, the "Processing,
please wait..." page is to be displayed for 1 second then then
processing state will be checked again.
So how can I implement the above?
Paul Spencer
<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%
if ( session.getAttribute("waitPage") == null ) {
session.setAttribute("waitPage", Boolean.TRUE );
}
else {
session.removeAttribute("waitPage");
response.setContentType( "text/html" );
response.sendRedirect("CrystalReportViewer.jsp");
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<f:view>
<f:verbatim>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Please Wait...</title>
<meta http-equiv="Refresh" content="0">
<style type="text/css" media="screen">
#Content {
width:343px;
margin:0px auto; /* Right and
left margin widths set to "auto" */
padding:200px 0px 0px 5px;
}
</style>
</head>
<body>
<div id="Content">
</f:verbatim><h:graphicImage
value="/pages/images/loading.gif" width="343" height="93" alt=""/><f:verbatim>
</div>
</body>
</f:verbatim>
</f:view>
</html>