tableView.jsp


<html>
<head>
    <link rel="stylesheet" href="css/mi.css" type="text/css">
<!-- href uses "standard" ME settings: 127.0.0.1 = localhost on the Desktop and also works on the PDA -->
    <a href="http://127.0.0.1:4444/me" > <img src="mimes/SAP_me.gif" alt="Back to ME Home" ></a>
</head>
<body>
  <jsp:useBean id="dataBean" scope="session" class="example3.bean.TableViewBean" />
<!-- Display title of the example -->
  <h6><%=dataBean.getString() %></h6>
<!-- Table definition -->
  <table width="100%" bgcolor="#D4E2EE" border="0" cellspacing="0" cellpadding="0" >
    <tr class="miHeader" >
<!-- The entries in row 0 are used as headline of the table - so we change background color -->
        <td class="1stCellHeader" ><theader><%=dataBean.getTableContent(0,0) %></theader></td>
        <td class="nextCellHeader"><theader><%=dataBean.getTableContent(0,1) %></theader></td>
    </tr>
    <%

      int cols = dataBean.getTableColumns();
      int rows = dataBean.getTableRows();

      for(int i=1; i < rows; i++) {
      String cellClass = "1stCellBody";
// begin of a row 
      %> <tr class="miBody"> <%

       for(int j=0; j < cols; j++) {
         %> <td align="left" valign="top" class="<%=cellClass%>"> <%=dataBean.getTableContent(i, j)%> </td> <%

         cellClass = "nextCellBody";
       }
// end of a row 
       %> </tr> <%

      }
    %>  
  </table>
</body>
</html>