<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)array_search_results.jsp    1.10    03/09/17     SMI"
   * 
   */
 --%>
<%@ include file="/layout/toptags.jsp"%>

<!-- locale stuff -->
<html:html locale="true">
<!-- end locale -->

<!-- Place Java Script Here -->
 
<!-- HTML -->
<head>
<%@include file="/layout/page_head_section.jsp"%>
    <title>
        <bean:message  key="main.menu.title"/>
    </title>
</head>

<%@include file="/layout/bodytag.jsp"%>
<%@include file="/layout/top.jsp"%>
<%@include file="/layout/breadcrumb.jsp"%>
<%@include file="/layout/spacer.jsp"%>
<% try { %>
<% selectedSubItem = "root.menu.item5.item0arrayresults"; %>
<html:form action="/root.menu.item5.item0arrayresults.do">

<!-- hidden element which specifies the action for this form -->
<input type="hidden" name="request_action" value="<%=request.getAttribute("request_action")%>">

<%
  int listSize = 0;
     List results = (List)session.getAttribute(Constants.HttpRequestFields.T4_LIST_PARAM);
     if(results != null) {
       listSize = results.size();
     }
%>
<div class="content-layout">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <div class="major-category-text">
                <bean:message key="search.table.criteria"/>
              </div>
            </td>
            <td valign="bottom" width="99%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td class="property-separator" valign="bottom"><img alt border="0" height="2" src="/images/general/dot.gif" width="1"></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></td>
    </tr>
  </table>

<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>
  
<!-- search criteria table -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><bean:message key="search.item"/>&nbsp;
    <bean:message key="item.type.array"/>
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <bean:message key="search.criteria"/>&nbsp;<bean:write name="Search" property="criteria"/>
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <img alt border="0" height="8" width="1" src="images/general/dot.gif">
    <bean:message key="search.phrase"/>&nbsp;<bean:write name="Search" property="searchText"/></td>
  </tr>
</table>
<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <div class="major-category-text">
                <bean:message key="search.results.header.array"/>
              </div>
            </td>
            <td valign="bottom" width="99%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td class="property-separator" valign="bottom"><img alt border="0" height="2" src="/images/general/dot.gif" width="1"></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></td>
    </tr>
  </table>

<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>


      <table>      
          <!-- only show paging links if the list is long enough -->
          <% if(listSize > Constants.Formatting.MAX_ITEMS_FOR_PAGING) { %>
            <%@include file="/layout/prevnext.jsp"%>   
          <% } %>
  
          <tr>
            <td nowrap>
              <table class="back-table" border="0" cellspacing="0" cellpadding="1" width="100%">
                <tr>
                  <td>
                    <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">
                      <tr class="header-row">
                        <td>
                          <div class="table-header-text">
                            <bean:message key="main.menu.t4.summary.name"/>
                          </div>
                        </td>                        
                        
                        <td>
                          <div class="table-header-text">
                            <bean:message key="main.menu.t4.summary.description"/>
                          </div>
                        </td>   
                        <td>
                          <div class="table-header-text">
                            <bean:message key="main.menu.t4.summary.health"/>
                          </div>
                        </td>                      
                      </tr>                                           
                        <%
			  if(listSize > 0) {
                          Integer begin = (Integer)request.getAttribute("beginIndex");
                          String beginIndex = "0";
                          if(begin != null) {
                            beginIndex = begin.toString();
                          }
                          Integer maxrows = (Integer)request.getAttribute("maxRowsPerListing");
                          String max = "0";
                          if(maxrows != null) {
                            max = maxrows.toString();
                          }

                        %>
 			<logic:iterate id="t4" 
				name="<%=Constants.HttpRequestFields.T4_LIST_PARAM%>" 
				type="T4Interface" 
				indexId="index" 
				offset='<%= beginIndex %>' length='<%= max %>'>

                          <tr>
                            <td>     
                              <div class="table-label-text">                    
                                <a href="root.menu.item0.item1express.do?name=<bean:write name='t4' property='name'/>">
                                  <bean:write name="t4" property="name"/>
                                </a>
                              </div>
                            </td> 
                            <td>              
                              <div class="table-label-text">                 
                               <bean:write name="t4" property="description"/>
                              </div>
                            </td> 
                            <td align="center">              
                              <div class="table-label-text">                 
                               <bean:message key='<%="array.health.code." + t4.getHealthStatus()%>' />  
                              </div>
                            </td>                                                
                         </tr>
                        </logic:iterate>
                      <% } %>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
            <!-- only show paging links if the list is long enough -->
          <% if(listSize > Constants.Formatting.MAX_ITEMS_FOR_PAGING) { %>
            <%@include file="/layout/prevnext.jsp"%>   
          <% } %>
   
        </table>
</div>

<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="20" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>



<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="20" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

</html:form>
<% }catch(Exception ex) { 
      Trace.error(this, "array_search_result.jsp", " exception in jsp");
   }
%>
  
</body>
</html:html>
