From: <pee...@us...> - 2003-08-01 04:14:45
|
Update of /cvsroot/digir/web In directory sc8-pr-cvs1:/tmp/cvs-serv22491 Modified Files: searchForm_manis.jsp searchFunctions_manis.js Log Message: Added timeout field and validation for such. Index: searchForm_manis.jsp =================================================================== RCS file: /cvsroot/digir/web/searchForm_manis.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** searchForm_manis.jsp 22 May 2003 05:28:33 -0000 1.2 --- searchForm_manis.jsp 1 Aug 2003 04:14:42 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <%@ page import="java.util.ArrayList" %> + <%@ page import="java.util.List" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.Vector" %> *************** *** 10,27 **** <%@ page import="org.calacademy.digir.presentation.Translation" %> ! <%-- ! The pageTitle and displayTitle variables are used in the included header.jsp ! and also in the <title> tag. The displayImage, displayLink and trail are also ! used in the header.jsp file. The displayFooter is used in the footer.jsp file. ! --%> <%! String pageTitle = "Query Form"; %> <% ! String displayTitle = null; ! String displayImage = null; ! String displayLink = null; ! String displayFooter = null; ! String trail = null; String infodoLoc = null; --- 11,25 ---- <%@ page import="org.calacademy.digir.presentation.Translation" %> ! <%@ include file="displayElements.jsp" %> ! <%! String pageTitle = "Query Form"; %> <% ! String trail = ! "<a href='/pres/PresentationServlet?action=home'>Portal Home</a>"; ! ! ! int maxTimeout = ((Integer)request.getAttribute("maxTimeout")).intValue(); String infodoLoc = null; *************** *** 53,68 **** Iterator rsIter = null; ! SortedSet providers = null; Iterator pIter = null; %> <% - displayTitle = (String)request.getAttribute("title"); - displayImage = (String)request.getAttribute("image"); - displayLink = (String)request.getAttribute("link"); - displayFooter = (String)request.getAttribute("footer"); - - trail = "<a href='/pres/PresentationServlet?action=home'>Portal Home</a>"; - infodoLoc = (String)request.getAttribute("loc"); --- 51,59 ---- Iterator rsIter = null; ! List providers = null; Iterator pIter = null; %> <% infodoLoc = (String)request.getAttribute("loc"); *************** *** 129,133 **** } ! providers = (SortedSet)request.getAttribute("providers"); if ((providers != null) && (providers.size() > 0)) { --- 120,124 ---- } ! providers = (List)request.getAttribute("providers"); if ((providers != null) && (providers.size() > 0)) { *************** *** 176,179 **** --- 167,171 ---- var numClauses = 0; var firstLoad = true; + var maxTimeout = <%= maxTimeout %>; *************** *** 351,355 **** <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="#663366" valign="center"> <td><font face="arial" size="+1" color="white">Select data providers</font></td> <td align="right"> --- 343,347 ---- <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="<%= displayColor %>" valign="center"> <td><font face="arial" size="+1" color="white">Select data providers</font></td> <td align="right"> *************** *** 397,401 **** if (cSchema.equals(conceptualSchema)) { ! comboname = name + " - " + r.getName(); code = r.getCode(); --- 389,401 ---- if (cSchema.equals(conceptualSchema)) { ! ! if (p.getErrorFlag()) ! { ! comboname = name + " - " + r.getName() + " *"; ! } ! else ! { ! comboname = name + " - " + r.getName(); ! } code = r.getCode(); *************** *** 428,436 **** </td> </tr> </table> </p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="#663366" valign="center"> <td><font face="arial" size="+1" color="white">Select query conditions</font></td> <td align="right"> --- 428,442 ---- </td> </tr> + <tr> + <td> + <font size="-1"><i>* Indicates data provider may be currently unavailable</font></i> + </td> + <td> </td> + </tr> </table> </p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="<%= displayColor %>" valign="center"> <td><font face="arial" size="+1" color="white">Select query conditions</font></td> <td align="right"> *************** *** 444,452 **** <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="#663366" valign="center"> <td><font face="arial" color="white" size="+1">Specify result set structure</font></td> - <td align="right"> - <a href="/pres/PresentationServlet?action=conceptInfo&referrer=search&loc=<%=infodoLoc%>"><img src="info.gif" height="22" width="22" hspace="2" alt="info" border="0"/></a> - </td> </tr> </table> --- 450,455 ---- <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="<%= displayColor %>" valign="center"> <td><font face="arial" color="white" size="+1">Specify result set structure</font></td> </tr> </table> *************** *** 608,612 **** <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="#663366" valign="center"> <td><font face="arial" color="white" size="+1">Specify record limit</font></td> </tr> --- 611,615 ---- <table width="100%" cellpadding="2" cellspacing="0" border="0"> ! <tr bgcolor="<%= displayColor %>" valign="center"> <td><font face="arial" color="white" size="+1">Specify record limit</font></td> </tr> *************** *** 615,619 **** <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> ! <td colspan="2"><p><font size="-1"><i> Enter a limit for the maximum number of records from each data provider to view in a combined result set. To obtain all records, --- 618,628 ---- <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> ! <td> ! <input type="hidden" name="rowStart" value="0"/> ! <input type=text name="rowLimit" value="10"/> ! </td> ! </tr> ! <tr> ! <td><p><font size="-1"><i> Enter a limit for the maximum number of records from each data provider to view in a combined result set. To obtain all records, *************** *** 623,630 **** </td> </tr> <tr> ! <td> ! <input type="hidden" name="rowStart" value="0"/> ! <input type=text name="rowLimit" value="10"/> </td> <td align="right"> --- 632,657 ---- </td> </tr> + </table> + <p> + <table width="100%" cellpadding="2" cellspacing="0" border="0"> + <tr bgcolor="<%= displayColor %>" valign="center"> + <td><font face="arial" color="white" size="+1">Specify timeout (optional)</font></td> + </tr> + </table> + </p> + <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> ! <td width="70%"> ! <input type=text name="timeout"/><font size="-1"><i>seconds</i></font> ! </td> ! <td width="30%"> </td> ! </tr> ! <tr> ! <td> ! <font size="-1"><i> ! Enter the maximum number of seconds you care to wait for any provider ! to return the results of your query. Please note, a default timeout will ! be used if you leave the timeout blank. ! </i></font> </td> <td align="right"> *************** *** 632,636 **** </td> </tr> ! </table> --- 659,663 ---- </td> </tr> ! </table> Index: searchFunctions_manis.js =================================================================== RCS file: /cvsroot/digir/web/searchFunctions_manis.js,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** searchFunctions_manis.js 21 May 2003 09:01:29 -0000 1.1 --- searchFunctions_manis.js 1 Aug 2003 04:14:42 -0000 1.2 *************** *** 411,414 **** --- 411,438 ---- + if (error == false) + { + tmp = document.s.timeout.value; + if (tmp.length != 0) + { + if ((isNaN(document.s.timeout.value)) + || (document.s.timeout.value < 1) + || (document.s.timeout.value > maxTimeout)) + { + alert("Timeout must be a number within the range of 1 to " + + maxTimeout + ", or it must be blank."); + error=true; + } + else + { + if (flagsCookieValue.length > 0) + { + flagsCookieValue += "&"; + } + flagsCookieValue += "timeout=" + document.s.timeout.value; + } + } + } + //submit the doc *************** *** 469,472 **** --- 493,500 ---- } } + } + else if (name == "timeout") + { + document.s.timeout.value = value; } } |