<%-- $Id: eventList.jsp,v 1.17.4.6 2004/05/11 17:18:03 asivakumar Exp $ --%>


<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

<form name="listView">		  
  <table width="100%" border="0" cellspacing="0" cellpadding="3" align="center" class="rowBorder">
     <tr class="header2Bg"> 
	<td width="3%"> <input name = "toggleAll"  type = "checkbox" onclick = "javascript:ToggleAll(this,this.form)"></td>

         <c:forEach var="value" items="${headerList}">
            <c:set var="val" value="${value.columnName}"/>
              <TD nowrap class="header2Bg">

          <c:choose>
           <c:when test="${!empty ComplexSearchView}">     
                    <span class="header2"><fmt:message key='webclient.fault.event.${value.columnName}'/></span>
           </c:when>
           <c:otherwise>
                  <a class="header2" href="javascript:doSorting('<c:out value="${isAscending}"/>','<c:out value="${val}"/>')"><fmt:message key='webclient.fault.event.${value.columnName}'/>

             <c:if test='${value.columnName == orderByColumn}'>
                 <c:choose>
                    <c:when test="${param.isAscending == 'true'}">
                       <img src="/webclient/common/images/sortup.gif" border=0 width="11" height="7" hspace="2" vspace="1" alt="">
                   </c:when>
                   <c:otherwise>
                       <img src="/webclient/common/images/sortdown.gif" border=0 width="11" height="7" hspace="2" vspace="1" alt="">
                  </c:otherwise>
                </c:choose>
            </c:if>
            <c:if test="${empty orderByColumn}"> 
               <c:if test="${value.columnName == 'id'}">
                  <img src="/webclient/common/images/sortdown.gif" border=0 width="11" height="7" hspace="2" vspace="1">
               </c:if>
           </c:if>

          </a>
         </c:otherwise>
        </c:choose>
         </TD>

        </c:forEach>

        <c:forEach var="prop" items="${viewData}" varStatus="status" >
           <TR>
        <td><input name="rowSelection"  type = "checkbox" value="<c:out value='${prop.id}'/>,<c:out value="${prop.entity}"/>" onclick = "javascript:Toggle(this,this.form)"></td>	   

        <c:forEach var="value1" items="${headerList}">
           <c:set var="val" value="${value1.columnName}"/>

        <c:url var="url" value="/fault/EventDetails.do?id=${prop.id} "></c:url>
 
        <TD class=text>
        <c:choose>
         <c:when test="${val != 'source' && val != 'severity'}"> 
            <c:choose>
               <c:when test='${prop[val] != ""}'>
                  <c:out value="${prop[val]}"/>
               </c:when>
               <c:otherwise>
                  &nbsp;
               </c:otherwise>
            </c:choose>
         </c:when> 
         <c:otherwise> 
           <c:choose>
              <c:when test="${val == 'source'}">     
                 <a href="<c:out value='${url}'/>" ><c:out value="${prop.source}"/> </a>
              </c:when>    
              <c:otherwise>
                 <div align="center"><img src="<c:out value="${prop.imgsrc}" />" border=0 width="16" height="16" hspace="1"></div>
              </c:otherwise>      
           </c:choose>        
        </c:otherwise> 
      </c:choose>
      </TD>
    </c:forEach>
   </TR>
</c:forEach>
</table>
  </form>

