194 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
<TR>
<TD><IMG border="0" src="theme/redbook_logo.jpg" width="138"
height="114" align="left"></TD>
<TD align="left"><H1>FORMS SELECTION</H1></TD>
<TD><IMG border="0" src="theme/Workplace_Forms.jpg" width="158"
height="92" align="right"></TD>
</TR>
</TBODY>
</TABLE>
</CENTER>
<%@ page session="false" contentType="text/html"
import="java.util.*, java.io.File"%>
<!-- import DB2 connection library to make order query available -->
<%@ page import="forms.cam.itso.ibm.com.DB2ConnectionForms"%>
<TABLE border="0" width="760" align="center">
<TR>
<TD bgcolor="#699ccf"><B>Please select a Form from the DB2 database below</B><BR>
</TD>
</TR>
<TR>
<TD>
<%
String userID = (String) request.getAttribute("userRole");
if (userID == null) userID = "";
String [][] resArr = DB2ConnectionForms.getOrderListEmp(userID);
String html = "Current User Role is: <STRONG>" + userID + "</STRONG><P><HR>";
html = html + "<TABLE cell padding=5>";
String n = "<TD> </TD>";
String projectName = "WPFormsRedpaper";
html = html + "<TD><STRONG>ORDER
ID</STRONG></TD>"+n+"<TD><STRONG>CUSTOMER</STRONG></TD>"+n+"<TD><STRONG>AMOUNT</STRONG></TD
>"+ n;
html = html +
"<TD><STRONG>OWNER</STRONG></TD>"+n+"<TD><STRONG>DISCOUNT</STRONG></TD>"+n+"<TD><STRONG>STA
TUS</STRONG></TD>";
for (int i = 0; i < resArr.length; i++){
html = html + "<TR>";
html = html + "<TD>";
html = html + "<A href=/" + projectName +
"/SubmissionServlet?action=showForm&orderNumber=" + resArr[i][0]+">#
"+resArr[i][0]+"</A>";
html = html + "</TD>"+n;
html = html + "<TD>" + resArr[i][1] + "</TD>"+n;
html = html + "<TD>" + resArr[i][2] + "</TD>"+n;
html = html + "<TD>" + resArr[i][4] + "</TD>"+n;
html = html + "<TD>" + resArr[i][3] + "</TD>"+n;
html = html + "<TD>" + resArr[i][5] + "</TD>";
html = html + "</TR>";
}
html = html + "</TABLE>";
%>
<%=html %>